Do not crash when a repo has a detached HEAD}
Instead, we select a default branch - master by default, but the default
branch can be configured using config.ini.
Note that if the default branch does not exist in a repo, that should
not cause any issues.
Also adds phpunit to composer.json's require-dev section.