sane terminal user-input for nodejs using thunks / generators