Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir.

def _get_directory_stash(self, path):
        """Stashes a directory.

        Directories are stashed adjacent to their original location if
        possible, or else moved/copied into the user's temp dir."""

        try:
            save_dir = AdjacentTempDirectory(path)
            save_dir.create()
        except OSError:
            save_dir = TempDirectory(kind="uninstall")
            save_dir.create()
        self._save_dirs[os.path.normcase(path)] = save_dir

        return save_dir.path