Codify path adjustment stuff for url.parse

Fixes #14
Merge pull request #15 from tivac/issue-14

Codify path adjustment stuff for url.parse