Sorting versions

The directory iterator is not guaranteed to return versions in order.
Merge pull request #5 from deceze/master

Versions need sorting