fix(streams): close the file descriptor when the stream ends

what does node do if you write to a closed stream?