Change presubmit flow

Modify presubmit flow as described in #1010 
Use `set -e -o pipefail` for consistency with the rest of the scripts.  (This was added recently.)