Fix increment_path()
with multiple-suffix filenames
#5518
Merged
increment_path()
with multiple-suffix filenames
#5518