patchutils.py: Fix a bug in parsing version numbers, make parser less strict in some cases.