Fixes #509, renders directly to file rather than to memory when using render_file.