tests: use perl, not find+rm, to remove temporary directories