FAB-12211 Add Error Handling to build script
FAB-12211 Add Error Handling to build script

Enable '-ueo pipefail' for shell. Use 'getopt' ('getopts' is deprecated)
to parse command line arguments. Some minor cleanup to work with
'-ue'. Core functionality of script is unchanged.

Change-Id: I2740b3a37f30bf366d7c3ea6261a3d9e9c1bdf21
Signed-off-by: Tim Johnson <c924ec8e9bd900abfa7cd606c1679befe515cdef@linuxfoundation.org>

manish-sethi/fabric-sidedb,xixuejia/fabric,manish-sethi/fabric-sidedb,xixuejia/fabric,muralisrini/fabric,binhn/fabric,jimthematrix/fabric,hyperledger/fabric,binhn/fabric,stemlending/fabric,manish-sethi/fabric-sidedb,manish-sethi/fabric,jimthematrix/fabric,manish-sethi/fabric-sidedb,manish-sethi/fabric,xixuejia/fabric,muralisrini/fabric,hyperledger/fabric,binhn/fabric,manish-sethi/fabric-sidedb,stemlending/fabric,muralisrini/fabric,manish-sethi/fabric-sidedb,stemlending/fabric,stemlending/fabric,manish-sethi/fabric-sidedb