Creates an index of all words found in a text file.