Add control to mkdir db and cache directory.