export_files_from_s3: Move saving s3 object to local file to a separate function.
export_files_from_s3: Move saving s3 object to local file to a separate function.

This refactor makes upgrading boto to boto3 easier.
Based on https://github.com/zulip/zulip/pull/10370/commits/24bf813e8ace1275205d35d7b89e21a620ca16a0

brainwane/zulip,hackerkid/zulip,timabbott/zulip,tommyip/zulip,eeshangarg/zulip,rishig/zulip,zulip/zulip,dhcrzf/zulip,synicalsyntax/zulip,punchagan/zulip,jackrzhang/zulip,brainwane/zulip,andersk/zulip,tommyip/zulip,timabbott/zulip,rht/zulip,rht/zulip,showell/zulip,kou/zulip,showell/zulip,shubhamdhama/zulip,synicalsyntax/zulip,shubhamdhama/zulip,dhcrzf/zulip,showell/zulip,tommyip/zulip,punchagan/zulip,dhcrzf/zulip,shubhamdhama/zulip,brainwane/zulip,brainwane/zulip,dhcrzf/zulip,showell/zulip,hackerkid/zulip,synicalsyntax/zulip,kou/zulip,punchagan/zulip,eeshangarg/zulip,hackerkid/zulip,andersk/zulip,eeshangarg/zulip,punchagan/zulip,zulip/zulip,rishig/zulip,rishig/zulip,kou/zulip,kou/zulip,eeshangarg/zulip,zulip/zulip,eeshangarg/zulip,andersk/zulip,zulip/zulip,jackrzhang/zulip,tommyip/zulip,rishig/zulip,jackrzhang/zulip,eeshangarg/zulip,synicalsyntax/zulip,shubhamdhama/zulip,timabbott/zulip,zulip/zulip,timabbott/zulip,hackerkid/zulip,dhcrzf/zulip,punchagan/zulip,synicalsyntax/zulip,tommyip/zulip,showell/zulip,jackrzhang/zulip,tommyip/zulip,synicalsyntax/zulip,jackrzhang/zulip,brainwane/zulip,brainwane/zulip,brainwane/zulip,synicalsyntax/zulip,hackerkid/zulip,rht/zulip,hackerkid/zulip,punchagan/zulip,jackrzhang/zulip,rishig/zulip,kou/zulip,rht/zulip,rht/zulip,zulip/zulip,showell/zulip,andersk/zulip,rht/zulip,andersk/zulip,kou/zulip,eeshangarg/zulip,rishig/zulip,andersk/zulip,hackerkid/zulip,showell/zulip,shubhamdhama/zulip,dhcrzf/zulip,jackrzhang/zulip,dhcrzf/zulip,rishig/zulip,zulip/zulip,timabbott/zulip,shubhamdhama/zulip,andersk/zulip,rht/zulip,tommyip/zulip,punchagan/zulip,timabbott/zulip,timabbott/zulip,shubhamdhama/zulip,kou/zulip