fix transparency issue when converting png to bmp (was creating an empty
file)
now also creates parent folder if necessary