98% test coverage now.

2 more error cases and one odd template loading branch to test.
(Rolling back to node 0.8.18 fixed the crashes on running the tests.)