splitmatrix: Avoid reopening output files for every sequence

When splitting sequence file, open all output files before splitting
to avoid reopening the corresponding file for each sequence.