handle querystrings on static files

Use req.uri.pathname instead of req.url for generatings the temp
filename due to the querystring being included in req.url