Improve handling of directory creation failures

patch by Aleksey Yeschenko; reviewed by Brandon Williams for
CASSANDRA-5196