expanduser path in Trainer
the `output_dir` passed to TrainingArguments is not expanded (the behaviour is probably the same for logging_dir)
### Who can help

Library:

- trainer: @sgugger


## To reproduce
Directly using os.makedirs but this is what happens in Trainer
```py
In [7]: !mkdir ~/foo

In [8]: !cd ~/foo
/mnt/beegfs/home/lerner/foo

In [10]: os.makedirs("~/bar")

In [14]: !realpath "~/bar"
/mnt/beegfs/home/lerner/foo/~/bar

```

## To fix
Call os.path.expanduser before making dir
```py
In [10]: os.makedirs(os.path.expanduser("~/bar"))

In [18]: cd
/mnt/beegfs/home/lerner

In [21]: !realpath bar
/mnt/beegfs/home/lerner/bar
```


Sounds reasonable. Would you like to make a PR with this change?<|||||>Can do.
I should expand the path in TrainingArguments right? for logging_dir also?<|||||>Yes, `output_dir` and `logging_dir`, preferable in the postinit of `TrainingArguments` so it's done as early as possible.