ws: Wait for child process to exit in mock-sshd

Hopefully this will fix races where we don't get terminate signals
or exit codes correctly during our tests.

Closes #694
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>