clean test code
Improve the situation of tests' temporary files.