Made sure all the files closed correctly, and added more test cases. Note that one of the test cases changed because we have a race condition that I don't know how to fix.
Fixed a terrible bug in our parser involving improper use of realloc. Also found out more about the race condition and changed the test cases and README to match