add FileUtil.withTmpDir
use FileUtil.withTmpDir and FileUtil.using
Merge pull request #145 from xuwei-k/refactoring

refactoring