Make the tools->terminal setting more flexible.

Previously was hard coded with options to suit xterm.  As this is
being replaced with different terminal programs some do not accept
the same options.  The new setting stores the whole command with
%c to substitute the script name.  Upgrades old settings if a new
one does not exist.