Fixed Darwin opendir issues