Use encodeURIComponent instead, for other chars

Specifically '#'
Merge pull request #28 from michaelhood/fix/query-encoding

Use encodeURIComponent instead, for other chars