Make sure `base_dir` is set before creating `log_dir`

Otherwise it’ll log everything to `/tmp`.