Fix model saving by just using PyFile_AsFile