Write String/Buffer to a random temp file