arch: Use tempfile module to create temporary directory
It ensures created temporary directories will be removed once they are no longer needed.
I also added a commit setting log level to debug for URL requests.
Migrated from D8458 (view on Phabricator)