towards a contained test suite with no system state side effects

Here is a quick snapshot of my current work.
As I've mentioned elsewhere, until we have a more comprehensive way of linting the code base, I don't want to put linter directives in the code base piecemeal.

When somebody *does* get around to this, they should globally disable the rule discouraging `process.exit`, because npm's uses of it are correct for system utilities.