Fix issue #751 in branch 2.7

The issue #751 was fixed changing the way we should pass the file to write method in s3_object. Instead of pass the file stream, now we are passing the file name (through :file hash key) using the options hash.