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 can get short bursts of data without a newline.