Simplified creation of temporary files.

- Merged per-file temporary directory holder logic with the connection temporary directory logic.
- Shortened the names of the generated temporary files.