rl_helper: add ctrl-d parsing

When we press ctrl-d, the terminal send us an end-of-transmission
command. So we can exit from program.