gtk2: Improve runCommand implementation.

Fixes issue #41.