fix test failures due to duplicate directories for successive file
creations in a single test