Added retries as a parameter

I have added n_retries as a optional parameter. I'm using this lib to monitor performance of DreamHost Objects and sometimes I get the "ran out of retries" message. Most of the times 2 or 3 retries are enough.