Fixed get_headers test.
Data must be attached to request before the request is prepared.
Added better error reporting, using error messages returned from S3.