Fixed stat for duplicate filenames.