g_string memleak fix in recipe_handler and task_handler

g_strings should be freed regardles of whether they contain actual data or not.