Make 'build' commands work with non-interactive shells.

Tested that both './build/release.sh < /dev/null' and './build/shell.sh' work.
Merge pull request #1735 from jbeda/non-interactive-build-fix

Make 'build' commands work with non-interactive shells.