patchfile.py: loki is autodetected now