SPARK-1203 fix saving to hdfs from yarn