Added support for fflush, and changed tests to just all call fflush(0) at the end of the program instead of doing that at the command line