Fix a bug with ignore params printing a file path even if there are no unused variables

This branch fixes a bug with `--ignore-params` option and error reporting.

It also adds a bunch of tests for the cli and `--ignore-params` option.