set -e does not affect code inside bash functions, so wrap function calls with set -e. Also use local variables inside bash functions.
set -e does not affect code inside bash functions, so wrap function calls with set -e. Also use local variables inside bash functions.

Signed-off-by: Zeev Tarantov <f0070986de807fbce097ad533720bda533ae787f@initech.co.il>

01org/tpm2.0-tools,martinezjavier/tpm2-tools,martinezjavier/tpm2-tools,martinezjavier/tpm2-tools,01org/tpm2.0-tools,01org/tpm2.0-tools,martinezjavier/tpm2-tools