do a better job of creating necessary empty dirs