pep8 cleanup for root.py

This patch cleans up pep8 style issue in root.py

Also move error_production_handler and error_development_handler functions
to Root() class as they are used only in it.

Signed-off-by: Aline Manera <alinefm@br.ibm.com>