t7502-commit.sh: rearrange test to make more portable