exit with non-zero status when tests fail (fixes #858)
Merge pull request #860 from salomvary/fix-test-exit-status

exit with non-zero status when tests fail (fixes #858)