Convert to bytes only if we get a text_type for blobs

This allows unicode to be passed in for the blob parameter.

cc @danielgtaylor