Fix error detection on Windows
Fix error detection on Windows

Windows builds failed to report an error if it didn't occur
on the last command of the build. Batch files have no equivalent
for "set -e"; instead we need to check after each command for
the return value and exit if it is non-zero.

buildkite/agent,buildkite/agent,buildkite/agent