When uploading a file to a remote system, the file permissions are updated,
however the process taking care of it may not have completed this task before
the application tries to use it.
This change forces the calling thread to wait for Max 1 sec for it to complete,
If the process task takes longer an exception is thrown so the application can
provide a meaningful message to the user.
A second fix is provided in: execCmdInRemoteShell
So this method now makes sure that the remote connection is opened
before executing commands over the remote shell.
Change-Id: Ibe8bd2709e1b1f446e1f74aa8a3df424ac7fa650