(diary-list-entries): Prevent infloop when diary does not end in a