An alternative for generating temporary files with Ruby