Improve handling of directory creation failures

patch by Aleksey Yeschenko; reviewed by Brandon Williams for
CASSANDRA-5196
Merge branch 'cassandra-1.2' into trunk