Fix error message descript and inconsistent read usage
Reopen STDIN for reading script from STDIN

Fixes #1956