converter: fix memleaks in load_encoder_presets caused by not freeing the preset and scandir output on errors