Small correction in directories creation

And added autoclose plugin