Fix a few bugs introduced in ddad387
Fix a few bugs introduced in ddad387

Basically, we cannot add ``tuple`` to ``list``. Also, using
``getattr`` instead of ``hasattr`` is more reliable.

Ref: #1526

Safihre/cherrypy,cherrypy/cherrypy,Safihre/cherrypy,cherrypy/cherrypy,cherrypy/cheroot