Create tempdir for metadata changes in same parent dir

so that it will usually be on the same filesystem.

tempfile.mkdtemp() is still making the new directory with permissions
that will likely differ from the old directory.