Don't change error code if exit has been called

The `at_exit` block is setting a status code considering only if tests have passed.

There are cases on which a test, or a helper, would call exit with an error code, in those cases, this is the error code that should be reported.