Some minor code optimization in post_test_hook.sh
Some minor code optimization in post_test_hook.sh

set -ex is helpful for debugging test progress and
make test quit promptly once exception happens

Change-Id: I241a23c20f79bcae1d16858cc521971b6388bfe8

StackStorm/mistral,StackStorm/mistral,openstack/mistral,openstack/mistral