Removing empty folders from the flattened output.