Extract path.c from misc1.c

Still going at #209. This moves functions dealing with file names and paths into their own file. No doubt there is a lot of refactoring to be done here, but this gets them out of `misc1.c` for now. Also, I opened #414 to discuss this.