Modified build.sh to stop on errors and to copy the correct jar file.