Fix sequence numbers in filenames
This seems to have been a minor regression from ebee5b1d that changed sequence numbers to be filled with padded length + 1 instead of highest sequence number + 1 if there was a previous file. The tests didn't catch it because the sequence number and string length were both 1.