[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.
[fix] simple fixes #748 #744 #746
[test] add proper failing test case for #738
[fix] fix #738