Fix issue with querystring on relative paths

Fixes an issue that caused the first querystring to be parsed
prepending a "?" in the first variable name on relative urls
with no #fragment