Added safe_mkdir to utils