Code standards (editorconfig/jshintrc) as well as better error handling (dont throw if a callback was provided)
Ensure tmp directory exists before using it.
fixes a lingering this/self issue from the previous commit.