adding test cookie and querystring for integration testing
moving testcookie code earlier
escape cookie value
Merge pull request #5196 from guardian/testcookie

test cookie querystring and cookie