fix file fun in py3
Merge pull request #26 from GuoJing/pid

fix file fun in py3