Looks good, but would it make more sense to put this check in `SparkContext#addFile`? We might make assumptions elsewhere in the code the user has supplied a file.