Fixes #527 - not encoding URL params correctly
Fix URL encoding in tests
Merge pull request #528 from kleinsch/fix-url-param-encoding

Encode URL params correctly