Fixed temp file creation on Posix + bugs introduced by the constructor split in ThreadedFileStream.
Fixed invalid path given to openFile().