Fixed quoting of keys for cookie dumping and added test.