test-lib-functions.sh: teach test_commit -C <dir>