instead of writing a string to a buffer api (in python 3) write a buffer.

Signed-off-by: David Black <dblack@atlassian.com>
_need_compat_layer is not required in python 3.

Signed-off-by: David Black <dblack@atlassian.com>
Merge pull request #7 from dbaxa/python_3_support

More Python 3 support changes.