Updated Input File Parsing code.

Probably still has some bugs but I can't find them yet.  Satisfies runtests.py.