fix regression caused by #606

If WHISPER_DIR is specified w/o a trailing slash all metrics will contain a
leading period. This patch makes sure any leading period is removed from the
metric name.

See #606 for more details.
Revert "Add a function "sortByName""

This reverts commit fc74d347a178c670ef58d6090670c890eaf0ba8a from #419

Revert, since this is a duplicate of d7ae284 from #522
upgrade fix as suggested by @brutasse
Merge pull request #662 from ImmobilienScout24/fix/regression/build_index

fix regression caused by #606
Merge pull request #663 from ImmobilienScout24/revert/419

Revert "Add a function "sortByName""