Fix in extracting input prefix from a list of files to merge.