Better error handling on get_input()

Note: Intentional choice not to output error if command line parameter
for the filename is invalid, use sys.stdin instead.