Minor fix to create certain directories if they don't exist.