Don't monkey patch exit_json and fail_json, instead handle the SystemExit, add more tests