Add retry feature to gem downloader