tests: don't ignore return value from write.

Enables compiling with "-D_FORTIFY_SOURCE=2".
Solves github issue #1 (https://github.com/agordon/libgtextutils/issues/1).