Improved command-line parsing of version restrictions