Hoisted some more stuff out of build.sh.
Added clearer logging to the build process.