scripts/patchfile.py: Handle relative paths correctly