Update custom application example.

It's running on both Python 2 and 3 now.
adding here `if key in self.cfg.settings and value is not None` is fine. also no need to pass via a tmp_config, having the dict around is enough.