Appending a count for filenames that end up being duplicated