Use binary flag in file operations

This keeps Windows happy.

Signed-off-by: evilwombat <evilwombat@server.fake>