Fix Python 3 issue with function introspection

The two attributes ``im_func`` and ``func_name`` have been renamed
in Python 3 to ``__func__`` and ``__name__`` respectively. I've looked
at solutions used by the *six* module and within splinter itself. From
this, I think this is an appropriate solution.