Repository: sqlfluff/sqlfluff
Issue: "sqlfluff lint" crashes if there are no files to process

Running this command with SQLFluff 0.3.1 when the `sql/` directory contains no `.sql` files:
```
sqlfluff lint --dialect bigquery sql/
```

results in this crash:
```
Traceback (most recent call last):

  File "/usr/local/pyenv/versions/lib-3.7.3/bin/sqlfluff", line 11, in <module>

    load_entry_point('sqlfluff==0.3.1', 'console_scripts', 'sqlfluff')()

  File "/usr/local/pyenv/versions/3.7.3/envs/lib-3.7.3/lib/python3.7/site-packages/click/core.py", line 829, in __call__

    return self.main(*args, **kwargs)

  File "/usr/local/pyenv/versions/3.7.3/envs/lib-3.7.3/lib/python3.7/site-packages/click/core.py", line 782, in main

    rv = self.invoke(ctx)

  File "/usr/local/pyenv/versions/3.7.3/envs/lib-3.7.3/lib/python3.7/site-packages/click/core.py", line 1259, in invoke

    return _process_result(sub_ctx.command.invoke(sub_ctx))

  File "/usr/local/pyenv/versions/3.7.3/envs/lib-3.7.3/lib/python3.7/site-packages/click/core.py", line 1066, in invoke

    return ctx.invoke(self.callback, **ctx.params)

  File "/usr/local/pyenv/versions/3.7.3/envs/lib-3.7.3/lib/python3.7/site-packages/click/core.py", line 610, in invoke

    return callback(*args, **kwargs)

  File "/usr/local/pyenv/versions/3.7.3/envs/lib-3.7.3/lib/python3.7/site-packages/sqlfluff/cli/commands.py", line 150, in lint

    lnt.log(format_linting_result_footer(result, verbose=verbose))

  File "/usr/local/pyenv/versions/3.7.3/envs/lib-3.7.3/lib/python3.7/site-packages/sqlfluff/cli/formatters.py", line 146, in format_linting_result_footer

    text_buffer.write(format_linting_stats(result, verbose=verbose))

  File "/usr/local/pyenv/versions/3.7.3/envs/lib-3.7.3/lib/python3.7/site-packages/sqlfluff/cli/formatters.py", line 106, in format_linting_stats

    all_stats = result.stats()

  File "/usr/local/pyenv/versions/3.7.3/envs/lib-3.7.3/lib/python3.7/site-packages/sqlfluff/linter.py", line 381, in stats

    all_stats['avg per file'] = all_stats['violations'] * 1.0 / all_stats['files']

ZeroDivisionError: float division by zero
```

Changed files:
src/sqlfluff/linter.py

diff --git a/src/sqlfluff/linter.py b/src/sqlfluff/linter.py
index 520672e8..ccb8246d 100644
--- a/src/sqlfluff/linter.py
+++ b/src/sqlfluff/linter.py
@@ -379,8 +379,12 @@ class LintingResult:
         all_stats = dict(files=0, clean=0, unclean=0, violations=0)
         for path in self.paths:
             all_stats = self.sum_dicts(path.stats(), all_stats)
-        all_stats['avg per file'] = all_stats['violations'] * 1.0 / all_stats['files']
-        all_stats['unclean rate'] = all_stats['unclean'] * 1.0 / all_stats['files']
+        if all_stats['files'] > 0:
+            all_stats['avg per file'] = all_stats['violations'] * 1.0 / all_stats['files']
+            all_stats['unclean rate'] = all_stats['unclean'] * 1.0 / all_stats['files']
+        else:
+            all_stats['avg per file'] = 0
+            all_stats['unclean rate'] = 0
         all_stats['clean files'] = all_stats['clean']
         all_stats['unclean files'] = all_stats['unclean']
         all_stats['exit code'] = 65 if all_stats['violations'] > 0 else 0