test clearEmptyDirectories