[test] temp dir should be removed after app exits
Merge pull request #1388 from kingFighter/tests

[test] temp dir should be removed after app exits