Fixed test hooks in py_hook_script2.py and lua_hook_script2.lua