Exit on error

My previous PR didn't work well when things weren't installed and someone else fixed by removing set -e. This should play nicer with set -e while still having the script exit if other things break.  This also makes it so ctrl+c in the middle of it running exits fully instead of just killing the currently running command and trying to proceed.

I also moved the set -x that someone else added since it made the mac build harder to follow.  I think it will be nice on the linux stuff though.