Do not refer to self.app in handle_error

Due to Flask factory pattern, self.app may be None. current_app should be used instead.
Merge pull request #187 from singingwolfboy/patch-1

Do not refer to self.app in handle_error