Wait and retry when deleting temporary build dirs

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>