Fixed build.sh to merge into a clean working tree