[Bugfix] Allow for multiple ? in outgoing urls.

Without this fix urls that had multiple ? in them would drop sections
of the url since before there was an assumption of there only being one.