Code style refactoring.
Small optimization in directory creation.