fixes to fileinput (#1218)
fixes to fileinput (#1218)

- Correct incorrect return type for hook_encoded
- Add PathLike support
- Add some missing types
- Remove incorrect use of AnyStr
euresti/typeshed,li-dan/typeshed,azag0/typeshed