Fixing bug with mkdir