Read the file by chunks and also write chunks:
with open("portrait1.dng", "rb") as binaryfile :
with open("readfile.raw", "wb") as newFile:
while True:
chunk = binaryfile.read(4096)
if not chunk:
break
newFile.write(binascii.hexlify(chunk))
my whole university life is on this (translation, if it dies i die).
Make sure you backup your files regularly on a separate disk.