HTTP package: fix URL building

If a URL has no query string, the HTTP package added the string 'undefined' to the end of the URL.

This fix reduces the failing assertions in the existing tests for the HTTP package from 8 to 1 (using InDesign CS6 as the environment).

This fix is similar to pull request #23.