tests: ensure run-examples.sh returns a proper error code when tests fail

Signed-off-by: George K. Thiruvathukal <gkt@cs.luc.edu>
tests: ensure run-application-tests.sh returns a proper error code when tests fail

Signed-off-by: George K. Thiruvathukal <gkt@cs.luc.edu>