Use g_spawn instead of fork+exec*

        * Avoids issue with atexit being called for fork.
        * less code.