Fix key generation

- Query string keys must be escaped after the split as query string could look like 'weird%3Dkey=whatever'
- Rake util's unescape method forces utf-8 encoding on strings, which will cause the "invalid byte sequence in UTF-8" error for the most string methods called on badly encoded strings, e.g. Rack::Utils::unescape('%D0%BA=%D1').split('=')