Fix bug for single-end reads that sometimes put junk in output file after a duplicate.