fix weird hangs caused by stderr hanging open

This fixes some hangs running the git tests with watchman enabled