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.