Add rsync retries mechanism to prevent temporary error with it

Change-Id: I5d3d4928e5b7adf415896afcf4ad4c02c0c0cb32
Closes-Bug: #1322577
(cherry picked from commit 6ee3a5afdf36355fe38de964d65a62444dde957c)