gui: widget-io: Fix cleanup code in widget_printf(), widget_scanf().
The 'arg' member of arguments and the 'dir' member of char_directives
are only allocated from malloc() if there are more than fit in the
arrays that are included inside their respective structures, so they
must only be freed when that internal structure is not used.
Also, these arrays are allocated with malloc() and so must be freed
with free(), not g_free().
Thanks to Benoit Flippen <anagogue@gmail.com> for reporting the
problem.