Handle case when git/hg isn't already installed
Cleanup