--->What does the preprocess sub do?
It sorts the directory results so that the unpadded sequences comes back in the correct order. Without it the sequence comes back looking like this:
Which would make the sequence detection incorrect. It also handles the cases where there are files with the same name but different extension like this:
So the preprocess sub is necessary in my case unless I can do the same sort somewhere else