When running tests from command line, set exit code appropriately.
Merge pull request #24 from catseye/test-sets-exit-code

When running tests from command line, set exit code appropriately.