The snap version of Firefox cannot write to the /tmp location.
Recommended workaround is to set TMPDIR environment variable to location that both geckodriver and firefox can write to e.g. $HOME/tmp.
See https://github.com/mozilla/geckodriver/releases/tag/v0.31.0 and https://github.com/mozilla/geckodriver/issues/2010
This change adds the TMPDIR environment to allow testing with the Snap version of Firefox.
The downside is a possibly orphan directory (~/tmp) containing geckodriver and v8-compile-cache-1000.