Don't hardcode the temp dir to /tmp, use g_get_tmp_dir instead. Fixes #20894.

Hardcoding a temporary dir doesn't work on sandboxed apps.