gcc 4.8 requires -O with _FORTIFY_SOURCE
Fix format strings for size_t and ssize_t

gcc 4.8 requires us to specify %zx and %zu for size_t and
ssize_t types instead of just %x or %u.
host: check writing of checksum was successful

Check the return value of write(2).