Added better check before attempting to run git commands
Changed script name to match convention