fixing infinite loop

Fixes infinite loop on messy version names: e.g VersionSorter.sort ["1.0", "-"]
Merge pull request #1 from maliqq/patch-1

Fix for infinite loop