SPARK-4910 [CORE] build failed (use of FileStatus.isFile in Hadoop 1.x)

Fix small Hadoop 1 compile error from SPARK-2261. In Hadoop 1.x, all we have is FileStatus.isDir, so these "is file" assertions are changed to "is not a dir". This is how similar checks are done so far in the code base.