base/pkg/git.jl: don't shell out to find .git dir [fixes #4888]