When writing temporary plugin files, ensure the directory exists
When adding plugins as streams in PluginIT (which upcoming commits
will do), installing the plugin failed, as the temporary directory
does not exist.
Instead of fixing the caller of asTemp to create the directory
before the call, we instead change asTemp itself to create the
directory, and can thereby simplify other callers, which also
manually create the directory.