Fix bug in make dirs script