fixes - to ssh_command_target and replace shelling in _check_lock.

Change-Id: Ib9cfe38e78e88a82c179100492f6048952573fc2