Re-adding @jmdobry's fix for #7 (PR #8) to the master branch.

Currently, the test runner always reports success, even when the
test fail. This renders Travis badges useless as they rely on the
success/failure code to determine build success.