ensure directory exists.