* 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) {
      for (auto& path : paths) {
        content::FileChooserFileInfo info;
        info.file_path = path;
        info.display_name = path.BaseName().value();
        file_info.push_back(info);
      }
      if (render_frame_host_ && !paths.empty()) {
        auto* browser_context = static_cast<atom::AtomBrowserContext*>(
            render_frame_host_->GetProcess()->GetBrowserContext());
        browser_context->prefs()->SetFilePath(prefs::kSelectFileLastDirectory,
                                              paths[0].DirName());
      }
    }
    OnFilesSelected(file_info);
  }
#if defined(MAS_BUILD)
  void OnSaveDialogDone(bool result,
                        const base::FilePath& path,
                        const std::string& bookmark)
#else
  void OnSaveDialogDone(bool result, const base::FilePath& path)