Fixed bug in tf-idf index creation where output word map was not being written to first line of index.