Adding proper fwrite() return value check.
Adding proper fwrite() return value check.

Signed-off-by: Michal Schmidt <b2f54855ee5c6e19cecf0e24bef2348da08eb16e@redhat.com>

srajiv/tpm-tools,srajiv/tpm-tools,shpedoikal/tpm-tools,shpedoikal/tpm-tools,srajiv/tpm-tools,shpedoikal/tpm-tools