core: make mnesia dir config optional.