Added run_code_on_ext_kernel.py test script, along with fixes to make it run on CPython.