run_tests: fix exiting with return code