Get the program name from the name of the executable
Get the program name from the name of the executable

This enables us, during the development phase, to install in-development
binaries as "imag-unstable-<command>" (for example), so that we have
"imag" as a release binary in PATH and "imag-unstable" as a development
binary in PATH.

The change also enables the "imag" binary itself (if it is named
"imag-unstable" for example) to call imag-unstable subcommands, because
it calls "<own binary name>-<command>", for example
"imag-unstable-diary" instead of "imag-diary".

Signed-off-by: Matthias Beyer <1d6e1cf70ec6f9ab28d3ea4b27a49a77654d370e@beyermatthias.de>

matthiasbeyer/imag,matthiasbeyer/imag