Workaround for IE dropping the leading slash in pathnames

Various versions of Internet Explorer seems to neglect the leading slash under some conditions (not when watching it with the dev tools of course!). This was confirmed in IE10 + IE11

Fixes #809.
If the pathname is 'hello' initiall on IE, then eventually it should be '/'. In the current code it would be ''.