Make create command work for templates with subdirectories

If you have templates/default/some/nested/file.js, "path" refers to
templates/default so you'll get a file not found error when it looks for
templates/default/file.js.  "root" refers to
templates/default/some/nested (or whatever).