So I looked into this more and it turns out the `fileSystem` parameter is totally ignored by FileOutputFormat. So I think we can just do this:

```
 if (outputFormatClass.isInstanceOf[FileOutputFormat[_, _]]) {
      // FileOutputFormat ignores the filesystem parameter
      val ignoredFs = FileSystem.get(conf)
      conf.getOutputFormat.checkOutputSpecs(ignoredFs, conf)
    }
```

http://grepcode.com/file/repo1.maven.org/maven2/org.jvnet.hudson.hadoop/hadoop-core/0.19.1/org/apache/hadoop/mapred/FileOutputFormat.java#FileOutputFormat.checkOutputSpecs%28org.apache.hadoop.fs.FileSystem%2Corg.apache.hadoop.mapred.JobConf%29