Find the first IO object that is not a StringIO
Rewind IO objects after digesting them

Tempfile and other IO objects (except File) are not self-rewinding.
Thus, reading them for digest leaves them in a really bad state :).