[master] Fix popularity scan
There was a bug that created an exception when there is an error returned from the service.
In addition global variables were used that were not re-initialized at every loop. Done now in scanPopularity()
method
Also suppressed useless printout of invisible directories.
Edited by Philippe Charpentier