Fix rewriting resulting in requests with '//' as the beginning of the path.

Some servers are picky about paths having extra '/'s at the beginning of the path. This corrects the path to match the url (no trailling '/').