fix --inputs behavior

don't read stdin when using --inputs
use getline instead of operator>> to support spaces in file names
don't check fail flag when there is nothing left to read - it is set by getline/operator>>
check --inputs behavior in a test