sane terminal user-input for node.js using thunks / generators