Handle query strings when replaying requests (fixes GH-358)