Fixes #35: make sure the directory exists before creating error.txt in it
Fixes #24 (and adobe-photoshop/generator#38)
Merge branch 'master' into jp/dev