Fixes a bug that would cause the program to quit silently if a directory name was passed as input file.