create any leading directories