debugger: exit with failure for internal errors.

If the script fails execution rather than just returning failure we
still want to propogate that to the user.
sim: fix indirect branches.

Our indirect branches should branch to the contents of the register, not
the register identifier.
tests: provide a way to override the target.

This is useful for running the tests on a different machine to the
simulation/jtag daemon.
tests/calls: include an indirect branch.