[SPARK-4792] Add error message when making local dir unsuccessfully

`IOException` is more appropriate.