Fix stdin inheritance for system and backticks on VMS.

The documentation to LIB$SPAWN says that standard input will be
inherited from the parent if not specified, and we've been
depending on that.  But it seems not to actually work that way
as a simple

    $ perl -e "system('edit foo.tmp');"

was failing due to the input not being a terminal.  So set up the
input explicitly using the same mechanism we've always used for
output and error.

Except when SYS$INPUT is a "directory," which probably means it's
a channel open on a volume that holds a command procedure.