readline: move pause() before _setRawMode()

Fixes: #5927

Adds regression test