tests/utils: don't ignore the return value of fwrite()