Fix safety in case of an existing TRD2D config without a TRD1D config.
It was not checked if a Trd1D config exists before trying to get its main branch name. This caused a seg violation in case no Trd1D config was added. Now the safeties are adjusted to check for it. Includes a minor update of the naming scheme