fix cqlsh crash if mkdir ~/.cassandra fails + shell warning

Patch by Mihai Suteu for CASSANDRA-7266.