create temporary files in an instance-specific temporary directory

Don't use the system temporary directory, since it may have
only limited space available.