Fixed JTagController and demo/api starter tools.

Fixed an error in the starting routine of the controller. During the connect phase, commands may need to be sent for verification, so the lock needs to be present before connecting is attempted.

Demo and API Server applications now returns an error to the prompt without a Python traceback in the event of missing hardware.