not rewriting duplicate params in url

The urls are currently rewritten if duplicate params are added. 

parseKeyValue and toKeyValue have been altered slightly to allow for duplicate fields that are in the url as strings.