add timeout and max_retries options
Merge pull request #2 from cpan-mila/master

add timeout and max_retries options