Check for git prior to calling shell.exec