Returning failure exit code for test scripts.

Tests run within scripts were failing silently. I added bash logic after test
runs to check previous exit status and exit the script with a failure code if
the test commands failed.

Fixes #1293