Minor fixes on directory creation.