lua: fix query string handling, the QUERY_STRING environment variable must not contai...