Correctly handles different eof structures

Program correctly parses files that end with a newline, space, or eof.
Sample input
Included documentation
Updated assignment

I lost the original commit history, hopefully I'll keep it next time.