Dataset load problem when using own data to run run_mim.py
### System Info

transformers 4.27.0
python 3.8.16
Ubuntu 20.04

### Who can help?

_No response_

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

I directly use the script run_mim.py (examples/pytorch/image-pretraining) to fine-tune the VIT model on my own data, I got the error FileNotFoundError: Unable to find 'my dataset absolute path' at /. However, when I run the script run_image_classification_no_trainer.py (examples/pytorch/image-classification) to fine-tune the VIT model on the same data with the same path, everything is ok.

### Expected behavior

I compare the implementation of run_mim.py and run_image_classification_no_trainer.py. It seems that the previous one has some problems when sets train_dir. 
In run_image_classification_no_trainer.py, the implementation is data_files["train"] = os.path.join(args.train_dir, "**") seeing https://github.com/huggingface/transformers/blob/main/examples/pytorch/image-classification/run_image_classification_no_trainer.py#L266
In run_mim.py, the implementation is data_files["train"] = self.train_dir seeing https://github.com/huggingface/transformers/blob/main/examples/pytorch/image-pretraining/run_mim.py#L109
The later one misses "**" in the file_path for loading dataset.
I changed the code in my local file, and the script run_mim.py runs well.
Would you like to open a PR with your fix?<|||||>> Would you like to open a PR with your fix?
I am not sure whether my solution is correct, I hope your organization could check it. If the solution is ok,  it is my honor to open a new PR.
<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.