Fix filehandles leaking on shell modules

When shell module plugins failed and exited,
confluent was failing to release the filehandle.  This
would ultimately lead to unreasonable exhaustion of
filehandles.