Problem: as fileio is cached and reads blocks this is going to wait
until either EOF or reading enough characters to fill rbuffer. This is
not good when reading user input from stdin as script.
According to the documentation fsync() may fail with EROFS or EINVAL if “file
descriptor is bound to a special file which does not support synchronization”
(e.g. /dev/stderr). This condition is completely valid in this case since main
point of `file_fsync()` is dumping buffered input.