make CommonJS modules testable
Merge pull request #20 from davidchambers/require

make CommonJS modules testable