Small fix to `TestApp.set_cookie`

My previous pull request, #117, had a small bug in it.  This fixes that.