SF bug #887946, segfault if redirecting directory
Also provide a warning if a directory is passed on the command line.
Add minimal command line test.

Will backport.
diff --git a/Misc/NEWS b/Misc/NEWS
index bf40e9d..0826013 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@
 Core and builtins
 -----------------
 
+- SF Bug #887946: fix segfault when redirecting stdin from a directory.
+  Provide a warning when a directory is passed on the command line.
+
 - Fix segfault with invalid coding.
 
 - SF bug #772896: unknown encoding results in MemoryError.