Rewrite install script in python.

Things like realpath are not available on os x.  Platform compatibility
with bash is too annoying.
Minor git config updates.
Test if globstar shopt is available (missing on os x).