* 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
#endif
  {
    std::vector<content::FileChooserFileInfo> file_info;
    if (result) {
      content::FileChooserFileInfo info;
      info.file_path = path;
      info.display_name = path.BaseName().value();
      file_info.push_back(info);
    }
    OnFilesSelected(file_info);
  }
  void OnFilesSelected(
      const std::vector<content::FileChooserFileInfo>& file_info) {
    if (render_frame_host_)
      render_frame_host_->FilesSelectedInChooser(file_info, mode_);
  }
  
  void RenderFrameHostChanged(content::RenderFrameHost* old_host,
                              content::RenderFrameHost* new_host) override {
    if (old_host == render_frame_host_)
      render_frame_host_ = nullptr;
  }
  
  void RenderFrameDeleted(content::RenderFrameHost* deleted_host) override {
    if (deleted_host == render_frame_host_)
      render_frame_host_ = nullptr;
  }
  
  void WebContentsDestroyed() override { render_frame_host_ = nullptr; }