added support for directory creation upon save