fix a bug where templary file might be removed using Tempfile
Merge pull request #1 from Watson1978/master

fix a bug where templary file might be removed using Tempfile