Fix an issue saving file attachments after guessing the mimetype.

In order to guess the mimetype for a file attachment, we'd feed the
contents to `file`. This worked fine, except that we never seeked the
position back to 0, causing issues when trying to write the file. This
really upset boto, breaking S3 support for any files we didn't have a
mimetype for.

The fix is simple. Just seek back to 0.

Reviewed at https://reviews.reviewboard.org/r/5842/