Ensure that the directories exist before using them