meson: Don't check if .git is a directory
In a git worktree, .git is a regular file. Fix the check by just testing whether .git exists.
If you accept the patch, please apply it to pangomm-2-42 branch as well. This problem was found during building pangomm-2-42 branch because I used git worktree as a way to save disk space.