Fix example generator bug where mkdir failed