Move imports after parsing CLI arguments to use logging.

Once the logging module has been set up, it seems that we can't change the
level with which it logs messages.
Add debugging points.
PEP-8 cleanup.
Accommodate for layout changes in the pages.
Add slash to compensate for removed slash in the EDX_HOMEPAGE constant.