clean up properly after test_git
clean up properly after test_git

Restore original directory after test_git.  Otherwise, next tests
are run in non-existing directory and fail:

[...]
>           cwd = os.getcwd()
E           FileNotFoundError: [Errno 2] No such file or directory

/usr/lib/python3.9/site-packages/gunicorn/util.py:443: FileNotFoundError

While at it, reflow the logic so that the temporary directory is always
cleaned, even if the test fails in middle of setup.

fsspec/filesystem_spec,intake/filesystem_spec,fsspec/filesystem_spec