add BaseHandler that handles and passes through urlopen exceptions

also move django template path monkey patch here from activitystreams-unofficial