Outputing Index terms

Added some code that creates a text file "out.txt" in the working
directory that contains all of the terms in the index (I hope).

Going through the index, we can see that something is going wrong. There
is a significant amount of ???, Wikipedia markup, numbers, and some file
names appearing in the index.

Signed-off-by: Kevin <kevinfong27@gmail.com>