* Electron Version: master
* Operating System (Platform and Version): macOS 10.13
* Last known working Electron version: N/A

**Expected Behavior**
Application bundles cannot be selected as they are directories, not files

**Actual behavior**
Application bundles can be selected, but are not handled properly as they are not files

**To Reproduce**
in Electron default_app:
```
var input = document.createElement('input');
input.type = 'file';
input.click();
```

**Additional Information**
- Firefox: uses `[dialog setTreatsFilePackagesAsDirectories:YES]`
- Chrome & Safari: creates a ZIP file containing the bundle contents automatically

atom/browser/web_dialog_helper.cc
}
    if (extensions.size() > old_extension_size)
      valid_type_count++;
  }
  
  if (extensions.empty())
    return filters;
  filters.push_back(file_dialog::Filter());
  if (valid_type_count > 1 || (valid_type_count == 1 && description.empty()))
    description = "Custom Files";
  DCHECK(!description.empty());
  filters[0].first = description;
  for (const auto& extension : extensions) {
#if defined(OS_WIN)
    filters[0].second.push_back(base::UTF16ToASCII(extension));
#else
    filters[0].second.push_back(extension);
#endif
  }
  
  filters.push_back(file_dialog::Filter());
  filters.back().first = "All Files";
  filters.back().second.push_back("*");
  return filters;
}
}  
namespace atom {
WebDialogHelper::WebDialogHelper(NativeWindow* window, bool offscreen)
    : window_(window), offscreen_(offscreen), weak_factory_(this) {}
WebDialogHelper::~WebDialogHelper() {}