This just adds a TempFile class and replaces the use in FileOutputBuffer with it.
The only difference for now is better error handling. My idea is to once this is in:
- Convert other user of temporary files to it.
- Add support for automatically deleting on windows.
- Add a createUnnamed method that returns a potentially unnamed file. It would be actually unnamed on modern linux and have a unknown name on windows.
Some basic Doxygen here would be good.