* 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
case content::FileChooserParams::UploadFolder:
        flags |= file_dialog::FILE_DIALOG_OPEN_DIRECTORY;
        break;
      default:
        NOTREACHED();
    }
    auto* browser_context = static_cast<atom::AtomBrowserContext*>(
        render_frame_host->GetProcess()->GetBrowserContext());
    settings.default_path = browser_context->prefs()
                                ->GetFilePath(prefs::kSelectFileLastDirectory)
                                .Append(params.default_file_name);
    settings.properties = flags;
    file_select_helper->ShowOpenDialog(settings);
  }
}
void WebDialogHelper::EnumerateDirectory(content::WebContents* web_contents,
                                         int request_id,
                                         const base::FilePath& dir) {
  int types = base::FileEnumerator::FILES | base::FileEnumerator::DIRECTORIES |
              base::FileEnumerator::INCLUDE_DOT_DOT;
  base::FileEnumerator file_enum(dir, false, types);
  base::FilePath path;
  std::vector<base::FilePath> paths;
  while (!(path = file_enum.Next()).empty())
    paths.push_back(path);
  web_contents->GetRenderViewHost()->DirectoryEnumerationFinished(request_id,
                                                                  paths);
}
}