Add a guard before creating mnesia_dr
Fix condition
Several fixes

- upgrade to last syntax for clustering
- create even default directories
- create log dir