Fix to make a file read binary if such mode was set.