Use glib to parse commands for util_exec

Fixes #958