fixes fwrite invocation

According to the man page:

On success, fread() and fwrite() return the number of items read or written.
This number equals the number of bytes transferred only when size is 1. If an
error occurs, or the end of the file is reached, the return value is a short
item count (or zero).

Credits goes to David Haguenauer for this catch.
Removes extra parenthesis