Fix flakey spec by closing write pipe, generating an empty test module

Signed-off-by: Tamir Duberstein <tamird@squareup.com>