Robustness code added

Change-Id: I776fac2f03433db93ece23957d925d40067a2a3b
Make gdb.tap.sh to work in console mode

When in true console, xterm is not available. The commit attempts to solve
that. Probably not a optimal solution as TERM can have many more strings
when X is running. Good for now and an indication of what needs to be done
and where.

Change-Id: Ib65136bdd48be4e20bdd7145df6276bff4e9581c