check is dir before mkdir