Add pedantic mode, fixing backward compatibility

The new BareExcept warning would break builds everywhere unless it is
disabled by default. This patch adds -p,--pedantic options for enabling
such options.

This is the minimal solution that may work. Probably a better idea would
be a way to enable or disable certain warnings, as done by flake8 tool.
Starting with the simplest solution to get some feedback.