Fix pathname escaping problem

@gaye @lightsofapollo - I need this fix for a test I am writing. The dialer entrypoint currently has a hash inside the path which gets escaped if it's part of the pathname. Setting this as the has property of the URL object seems to fix this.

I was unable to get the unit tests working for some reason, so I will chat with one of you over IRC to figure this out, or if you could help me land this it would be much appreciated. Thanks!