Apply MJR fixes and add Test Script facility

Apply fixes from Mike Roberts to bugs in interaction between parser and
spelling checker that were causing some wayward responses to commands
involving non-existent objects such as FOO, especially when used in a
command without a verb, relying on the default action syntax.

Also added facility to define test scripts for debugging, based on the
testing extension by Ben Cressey, extended by Eric Eve and NR Turner.