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

I'd move all `django.utils.encoding` import to one line.