Some fixes for install-repo:

- Better path hacking.
- Create pth files for existing projects.

r? @nuoyan, @econner