Create requred folders and set correct permission before we start daemon...

We need to change order of the steps in this script since the folders needs to be created before we start the daemons the first time