Avoid Thomas+Trautner

by default spaces in http_build_query encoded with +, should be %20
Adjusted tests to changed URL encoding
Made URL encoding PHP 5.3 compatible