Fix word ordering in CSV (and HTML) output

The problem is that the `options` word order may not correspond to the `words_by_date` word order. So for safety, we extract the words directly from `words_by_date` rather than relying on the `options` values.