Node error support

This converts `src/errors.js` to use generated code vs. hand-coding everything, and more closely matches what happens in node.  It also adds tests and docs, and exposes errors on the Filer interface, for comparison.