Fixed superfluous ampersand when queries are embedded in paths

I'm using httparty to communicate with a REST service running deployd, which has a somewhat odd (yet legal) <a href="http://docs.deployd.com/docs/collections/reference/querying-collections.md">query syntax</a>. These queries fail in httparty because it is adding a superfluous ampersand to the end of them. This commit fixes that problem. I have also included a test that exercises the problem.