fix the write raw object tempfile mode error. The tempfile must be binary since the object is cyphered