Support both deflate and gzip

required tests for #write added, fixes #11 

As far as I could tell using Nock for these tests was a no go, since nock only handles the client side of requesting. Write is mostly about server internals