Define db path setting and make dirs if needed