Merge pull request #906 from JoesCat/master

some more scan check fixes
Close files opened by MakeTemporaryFile()

DumpSplineFontMetadata() returns 0 (not NULL), if error encountered.
SFDTrimUndoOldToNew_Output() closed files but should also free other vars