The write functions return success when nothing was written, e.g., on
a stream that is not open for writing:
writesf("data", "r", "/tmp/file");
They return the result of fclose() and drop the one from fprintf().
Return -1 when fprintf() fails, with errno from the failed write.
Closes#25