Properly parse the querystring.

The previous code wasn't properly parsing the querystring, including
urldecoding.
Merge pull request #1 from nubs/master

Properly parse the querystring.