Changed run_test.sh to set the work dir based on cache type