Port the build script to git.
Typo.
Portability fixes.