Adding `npm run coverage`
Fixing test bugs exposed by code coverage
Merge pull request #14 from ljharb/add_coverage_and_fix_tests

Add coverage and fix tests