Versions need sorting

The directory iterator is not guaranteed to return directory entires in any particular order, you need to sort versions if you're going to rely on their order later.

(This screwed up on a Ubuntu Quantal system for me by executing migrations in the wrong order.)