Needed to make the output image directory before actually writing to it