Make sure the directories have the right permission