Check for log and cache directories