Py_Main: fix double delete. add test.

fix #9