tempfile only needs to be opened with wb, not w+b
2 files changed