Fixes #286
Add tests for the stats

- Test that the right parameters are get to the stats for cases where
  those parameters are also geom aesthetics,
- Test all exceptions