[REBASED !32] Fix quoting issues in t-xdg-open.sh
This fixes autotests with Dash prior 0.5.11 and Bash of any version.
See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975228
Original patch by Nicolas Guriev.
Rebased and updated version of !32
Note: while I was at it I also decoupled local definitions from variable assignment
Closes: !32
Edited by Slatian