Updating tests to pass with new error handling, and
fix issues uncovered in the process.
Merge pull request #254 from stenington/error-handling-tests

Error handling tests