All errors are now returned as rejected Promises. This will make the error reporting more consistent with the tested output as well as the actual output. Added more tests for error cases and fixed minor argument processing bugs.