Fix detecting the native kernel to launch with sys.executable

This should address the test failures on Windows.