on py27, calling deepcopy on a file object doesn't raise TypeError, but leaves
the duplicated file object in an inconsistent state:
https://travis-ci.org/fonttools/fonttools/jobs/474811063#L714
any operations on it will fail with 'ValueError: I/O operation on uninitialized object'.
Thus, for semplicity for now we always do a manual copy the file contents into an
in-memory BytesIO stream, rather than attempting to call deepcopy first.