SPARK-1795 - Add recursive directory file search to fileInputStream

Added recursive directory search to fileInputStream. Want spark to be able to find files in the subdirectories rather than just the parent directory. 
how about this?
private def recursiveListDirs(fileStatuses: List[FileStatus],
                                      paths: Set[Path] = Set[Path]()
                                       ): Set[Path] = fileStatuses match {
    case f :: tail if f.isDir => recursiveListDirs(fs.listStatus(f.getPath).toList ::: tail, paths)
    case f :: tail => recursiveListDirs(tail, paths + f.getPath.getParent)
    case _ => paths
  }