Added directory creation to image uploader