Using urlparse instead of posixpath to leave double slashes in urls.