Fix parseQuery() method

If there is more than two variables in the query string with the same name, the corresponding array is not well formatted which causes an error in the function urlencode of the method buildQuery().