Addition of new file stream methods, and the TempFileOutputStream class

Signed-off-by: Irmo van den Berge <bergerkiller@gmail.com>