Make sys.path hackery more robust

This allows run.py to be invoked from a different cwd than the package
source folder.