Adapted to support exporting to new files in Drive

Note that this might only work in Google Apps.
Also made functions a little more composable, separating out conversion
to a list of attachments from emailing them, or creating new drive
files from them.