sorted function doesn't cut it

Using the sort function for the list of version numbers stopped working properly so I had to implement my own logic for sorting the version numbers.