With the addition of Puppet support, it's possible that the files
returned for the stack will be nested into directories. This directory
information will be carried in the key values for the templates dict
(e.g. 'hieradata/common.yaml' : <contents>).
This change looks for one or more directories in the template name and
creates the necessary structure in the template output directory.
Change-Id: Ic7dc65427ab9fdb981db1663c400e4e0cc3cc53d