Renamed print to write -it made more sense.
Added assumption that output dir exists at the generator stage.
Refactored writing code
Improved default output folder (when one isn't specified).
Fixed field reference in erb template
Small tweak to fix file generation
Small code refactor
Fixed typo
Refactored code
Fixed issue where fields weren't getting processed in embedded elements.