convert: fixed creating parent directories before writing images