Updated build script to exit if any command returns an error code that isn't 0