Update client to exit with proper code based on errors

I noticed that `client` doesn't exit with the right code when errors occur in a test like `runner` does. This should add the exact same logic to `client`.