Move test code into a test directory.
Add .npmignore, use npm registry in README.