Try to ensure unique file names when collapsing subdirectories