Create parent directories when opening a file for writing

Merged username-removed-945074 requested to merge Ede123/inkscape:fix_saving into master

(this affects callers of Inkscape::IO::fopen_utf8name)

Fixes issues where we tried to open a file for writing without checking if the parent directories existed (e.g. bug #1719629)

I scanned the code and didn't find any obvious problems but could you please cross-check if this could potentially cause issues?

Normal file saving is not affected as all implementations of the file save dialog prevent the user to specify non-existing directories. However it might affect some command line usage scenarios.