Further work on pyand. Can now properly select target device and run commands with device target.