resource: Create target dir if not exists
resource: Create target dir if not exists

This is the case where image processing is triggered from shortcodes, i.e. before the target page's folder in /public is created.

Fixes #4202

gohugoio/hugo,anthonyfok/hugo,gohugoio/hugo,fedelibre/hugo,mdhender/hugo,mdhender/hugo,fedelibre/hugo,mdhender/hugo,fedelibre/hugo,anthonyfok/hugo,mdhender/hugo,fedelibre/hugo,anthonyfok/hugo,gohugoio/hugo