Ensure logs path exists when initializing logs

Otherwise, for example, if we start datastore alone
like we do in the tests, we try to create logs without
the directory and traceback.