Create cache and config dirs.