gentree/git-tracker: make python 3 compatible

Make the python scripting compatible with python 3
(as tested with python 3.3). The patch library was
a bit tricky.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>