Fixed bug in build script (raise should be called rather than error).