ensure target directory exists before writing to it; write data before image
ensure target directory exists before writing to it; write data before image

mcccclean/node-gamesprites,playtweed/tweed-spritepacker