Fix directory creation.