Improve test code for using existing folders