lib/standard/file: Auto-flush write streams

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>