Scripts/Commands: Fix memory leak in ".gobject add" command

by @jackpoz