Fix bug 1018989: Alter base template to work without context processors.

Fixes some issues with the base template assuming certain variables 
exist.

Tested by visiting http://localhost:8000/500 and fixing errors until they stopped popping up.