create appropriate directory hierarchy