* 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
#include "atom/browser/web_dialog_helper.h"
#include <string>
#include <vector>
#include "atom/browser/atom_browser_context.h"
#include "atom/browser/native_window.h"
#include "atom/browser/ui/file_dialog.h"
#include "base/bind.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/file_chooser_file_info.h"
#include "content/public/common/file_chooser_params.h"
#include "net/base/mime_util.h"
#include "ui/shell_dialogs/selected_file_info.h"
namespace {
class FileSelectHelper : public base::RefCounted<FileSelectHelper>,
                         public content::WebContentsObserver {
 public:
  FileSelectHelper(content::RenderFrameHost* render_frame_host,