Made sure the precommit-hook copying operation is not done when we don't
have the access to git repo (.git folder).