Support taking input from stdin.  More tests; all pass.