Avoid nonportable ${x##y} substitutions in program tests.
Using ${x##y} is not portable: in particular it is not supported by
Solaris /bin/sh (or heirloom-sh). Define a new macro DX_BASENAME
which implements the particular substitution in a compatible way,
then use it in the flex, bison and gob2 tests.
Moreover, apparently heirloom-sh does not support "command" either,
so let's suppress the error message it generates (the tests will
still produce a usable result), and adjust the test cases to the
correct expected output in this scenario.