Replace bash download script with Ruby version