Set default cache dir if cache dir is null