[imp] Disallow directory listings in default config. Closes #4171