Fixes #67 (except for newlines)
5a45ce8 introduced a bug where prompts would be skipped because of process substitution in the surrounding while loop. Unit test for that bug has been added.