create logfile path if it doesn't exist

Resolves #8957
If `logfile` contains directories, we could also try to first generate them instead of falling back to `data/owncloud.log`