public Report cleanupDirs(Report report) throws IOException
	{
		List<Path> newDirectories = new ArrayList<Path>();
		for (Path path : report.getNewDirectories())
		{
			newDirectories.add(path);
		}
		Collections.sort(newDirectories, new Comparator<Path>()
		{
			@Override
			public int compare(Path o1, Path o2)
			{
				return o1.toString().length() > o2.toString().length() ? -1 : 1;
			}
		});
		for (Path targetDir : newDirectories)
		{
			if (isDirectoryEmpty(targetDir))
			{
				if (!isDirectoryEmpty(source.resolve(target.relativize(targetDir))))
				{
					if (!this.isSimulationMode)
					{
						Files.delete(targetDir);
					}
					report.removeDirectory(targetDir);
				}
			}
		}
		return report;
	}