Fix autotools git script ot be more robust

git-svn-id: https://svn.mcs.anl.gov/repos/exm/sfw/dev@12730 dc4e9af1-7f46-4ead-bba6-71afc04862de