Added retry mechanism for S3 connection errors

Closes #95
I would like to make failure to be repeatable if possible. Here if it fails in one test on 3rd access to a file with a certain name, it will always fail on the 3rd access to the file with the same name as long as random seed is the same.