Add tests

I used a test helper from the connect library and modified it to work
so the middleware can be tested in the context of the real connect stack.

The tempdirtest helper allows for each test to be run with a separate,
isolated datastore.
Create .npmignore to exclude files from publishing