Retry uploads on failure

The upload will retry 5 times and wait 5 seconds between each try on
failures.