Code standards (editorconfig/jshintrc) as well as better error handling (dont throw if a callback was provided)
Ensure tmp directory exists before using it.