Address SPARK-1717

I tested the change locally with Spark 0.9.1, but I can't test with 1.0.0 because there was no AMI for it at the time. It's a trivial fix, so it shouldn't cause any problems.

Author: msiddalingaiah <madhu@madhu.com>

Closes #641 from msiddalingaiah/master and squashes the following commits:

a4f7404 [msiddalingaiah] Address SPARK-1717
(cherry picked from commit bb2bb0cf6efcb1d18846e6c4904f3cd2da452f9f)

Signed-off-by: Patrick Wendell <pwendell@gmail.com>