rework test structure

This splits the tests into folders relevant to the parts of the
code they are actually testing. Also, the npm test command was
modified to only test files with .test.js extensions, ancitipating
my next cleanup to refactor out some of the boilerplate from all
tests