Ensure the contents are actually persisted in the temp file.

Temp files had empty contents, but it slipped through in testing locally. The fix is to add File#rewind before attempting to read the file.

[#82238400]