Add fflush for manual stdio flushing.

This is useful if you want to print something like an input prompt without a newline, or any other use cases in which you get short bursts of data without a newline.