As most are probably aware, the [ x"$var" = x"bar" ] convention used in many of the xdg-utils scripts is a rather ludicrous compatibility measure that only makes sense if extremely ancient Bourne shells need to be considered (which are themselves incompatible in many ways with such supposedly POSIX-compliant shells as Dash).
If that's the general attitude, that's ok, but the fact that old-style POSIX [ tests are broken in many places due to use of the == operator indicates that nobody really cares about compatibility anyway. Any such test will fail on all but Bash/Korn family shells' built-in test variants, and Gnu coreutils standalone "test" command which allow the == operator as a non-standard extension. Dash doesn't allow this, and neither would any of the multiple-decades-old shells that might require the ugly x"$var" hack.
I could go through and fix all these if anyone really wants, but it should be a simple enough task. I only bring it up after running across Freenode folks on more than one occasion who feel the need to stick to this (AFAICT) unwritten convention only to increase the likelihood that their patches are accepted.
I personally don't care about carrying the compatibility measures around forever either. If you don't mind doing the work creating a patch to address the issues you posed, I'll be happy to review/commit it.