An almost everywhere regularity result for minimal partitions