Change sorted calls from cmp to key function

Faced some issue in using the sphinx formatter on Python 3.4.
Change sorted calls to use "key" parameter in steps formatter

This should help to make it work in Python 3
Change write mode in file to binary
Merge branch 'fix-py3-sphinx-formatter' of https://github.com/johbo/behave into johbo-fix-py3-sphinx-formatter
CLEANUP: Remove outdated @wip tag.
PY2/PY3 compatibility: Use sorted(..., key=...) instead of cmp function.
Use attrgetter for sorted(..., key=function).
Merge branch 'johbo-fix-py3-sphinx-formatter'
Use some modifications, like attrgetter.