Move test error catching code before any other script files.
Fix test typo.
Minor source nit in test/test.js.