Fixed the build script to play well with Jenkins.