First draft of testLM.py

testLM.py should now read a LM file and test file, and output the
perplexity value.

While it seems complete, it has yet to be tested.

Minor changes were made elsewhere to remember the number of tokens in a
file, and to catch any exceptions when handling a file.