Fix the permission denied issue

Fixes #42

 - Create ES settings file/cache dir if not exist
 - Open ES settings file as root
Log ES service settings
Simplify the settings logging, as per review
Add test for settings logging
Merge pull request #51 from infoxchange/permission-denied-42

Permission denied 42