Add check for git directory