make check: avoid an error when no .git dir present.