Added replicate processing to makeProfile2, wrote averageTracks