fix busted error check in build.sh. scripting languages are the worst.