use ruby tmpdir library
refactoring
bug fix about timeout option
enhance test case
add test case
add test case
Merge branch 'enh1'