Commenting out the zeroSuppress line and changing the line after that worked for me. Note, these changes probably break the script for the case where you have multiple layer comps with the same name.
// omit sequence numbers
//fileNameBody += "_" + zeroSuppress(compsIndex, 4);
//fileNameBody += "_" + compRef.name;
fileNameBody += compRef.name;