Fix query-string serialization

Previously, query strings would be serialized incorrectly and resulted in unexpected results from the server.

This CL ensures that string mappings are properly treated as strings, and also avoids the insertion of an unnecessary %20.

Fixes #89