FileWrite: fix warnings

Namely:
- unused but set
- will break strict aliasing
- unchecked return value (fread)
Merge pull request #1 from tmatth/filewrite_fix_warnings

FileWrite: fix warnings