Changed read and write modes to read binary and write binary

Bad mem at ö