Fix tokenizer load from one file
# What does this PR do?

#18438 broke the (deprecated) API allowing a user to load a tokenizer from the path to a given file when said tokenizer only needs one file. This PR should fix it.

Fixes #19057 
_The documentation is not available anymore as the PR was closed or merged._