Sort names by number

Fixes bug #1369794: if machine names are numbers then sort them as numbers.
As discussed with @mitechie I've changed this to 50.