test/examples.sh: restore working directory b/w tests

av1_c_vs_simd_enc.sh changes directories which causes subsequent tests
to fail:
../aom/test/examples.sh: 32: .:
  cannot open ../aom/test/aomenc.sh: No such file

Change-Id: I873795c242bf3691b19c96d045b277000fe5444d
diff --git a/test/examples.sh b/test/examples.sh
index 87d8c2b..3e16123 100755
--- a/test/examples.sh
+++ b/test/examples.sh
@@ -10,6 +10,7 @@
 ##
 ## This file runs all of the tests for the libaom examples.
 ##
+readonly EXEC_DIR="$(pwd)"
 . $(dirname $0)/tools_common.sh
 
 example_tests=$(ls -r $(dirname $0)/*.sh)
@@ -30,4 +31,7 @@
   # Source each test script so that exporting variables can be avoided.
   AOM_TEST_NAME="$(basename ${test%.*})"
   . "${test}"
+  # Restore the working directory to the one at the beginning of execution.
+  # This avoids side-effects from tests that change the directory.
+  cd "${EXEC_DIR}"
 done