Created by: coderarity
This fixes nodejitsu/node-http-proxy#215. It changes the method to use url.parse (because it's easier to read, that old stuff took me a while to wrap my head around), and fixes it by replacing the path's part of the URL with the target's part of the URL, instead of just getting rid of it completely.