[bug] fixes a slightly uncommon bug in _guess_filename
I noticed this bug could occur sometimes while working on !64 (merged).
If zero-padding is being used in the filenames (e.g. a file name like
my_model_scenario_00_replicate_00.npz
) if the first file read has a
scenario/replicate index that uses all the digits in the filename format
(e.g. my_model_scenario_15_replicate_01.npz
) then it will not correctly
determine the zero-padding for the scenario index (it will guess no
zero-padding for the scenario index, and 2 for the replicate index)
This fixes that problem.