Check for git prior to calling shell.exec

Fixes #531