Finishing doParallelTopologicalWatershed function. Also sorting file.