Changed test script to give nonzero exit status if any tests fail