the problem is probably not where you think it is. with the info you give i would expect you just call the read method everytime, and thats where the tomanylisteners comes into place, because you just everytime append a new 'data' listener. if you change that 'on' to 'once' your application shouldnt crash anymore:
stdin.once('data'...
this of course isnt the solution to your problem, it is just to illustrate where your problem is (its not the trim/tolowercase.
if you show as a little bit more of your code maybe we are able to help you better, but probably your read-method is just unecessary overhead...