Add `input()` and `output()`
Those functions are wrappers for `read()` and `write()` function, in
order to handle special cases such as `EINTR`.