Avoid raising an error for submodule git trees.
If a project that is using the KDEGitCommitHooks macro is included as a git submodule, there is a .git
at the root of the project, but it's a file and not a directory. The EXISTS
is thus true, but later on the macro is failing because it tries to access files inside .git
as a directory.
I suggest to use IS_DIRECTORY
instead.