Fix Windows file opening in binary mode.