memmo #directory list (Enyu): refactor the create directory code.