Allow building with Python 3.x

Allow the scripts to run with both python 2.x and 3.x

Bug: 27498078
Bug: 22914603
Change-Id: I911118bcf370d09bdb2fb46afa21af64257f1ffb
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
(cherry pick from commit c434cf82d526f07cd3dcebf53582eeddf12b0a74)
2 files changed