Add support for submodule check

When using submodules, checks do break on incorrect path for commit_hooks directory. This patch parses gitdir from .git file and uses it for correctly linking to commit_hooks.