Fixed #23888 -- Forced File.__repr__ to return string

or just `type(repr(f))`.