Fixed a crash in the haskell parser

Previously would crash if node hadn't completely finished outputting
json by the time it was ready for it, which meant it was running on old
data every time it ran successfully. Made the program wait for node to
finish so that it always gets fresh json to work with