Fix E_WARNING when cache directory exists