Add error detection self-tests

Adds a new `env` directive EXPECTED_ERRORS, allowing to confirm
if a certain number of errors is in fact detected.
Fix PEP8 and add info message
Detect bad module names to install