On older versions of git init doesn't have the -b flag. That
was introduced in v2.28.0.
Instead switch to using git checkout -b which has much
wider support (2.4.12 was as far back as I could check on
the docs).
When the global git config has init.defaultbranch set to
something other than master the tests fail. This is because
the tests assume that the default branch is called master
but that may not be the case.
This fixes the tests by ensuring that when running git init
we ensure the default branch is called master regardless of
how git is configured.
any tests that use the filesystem should have their own unique directory, as we run our test suite in parallel and
cleanup of tests (removing directories) should not interfere with currently running tests