Fix gdb detection

Seems rich-core-dumper is invoked with PATH not exported to be seen
by subshells, so 'which' couldn't find 'gdb'.

Also discard zypper output that would be otherwise appended to the
core image.