Frustratingly, Ubuntu ships no python binary by default, only python3,
so we can't just call python and expect it to work. This will fail on
distros that don't ship python3, but them's the breaks.
If PROTON_DUMP_DEBUG_COMMANDS is set, the directory where
the debug scripts will be dumped to can be defined with
the env variable / setting PROTON_DEBUG_DIR.
This commit also lets users set PROTON_DUMP_DEBUG_COMMANDS
in user_settings.py, which didn't work previously because
the variable was being fetched from os.environ instead of env.
Closes#511
--Added double quotes around various variables to avoid globbing and word splitting.
--Removed use of legacy basetick and replaced with $()
--Avoid use of -a and -o and replaced with || and && which are more preferred.
Suggestions and fixes were recommended by shellcheck.