Safely modify the QUERY_STRING of a PSGI request