[PATCH] init-db.c: create and use safe_create_dir helper