Modify run_tests.sh, fix bug in replacing encrypted variables