test-lib: fix GIT_EXIT_OK logic errors, use BAIL_OUT