Correctly report an attempt to open a directory instead of a file. (Bug #205)