Use uuid.UUID4.hex instead of .get_hex()

On python3.4 the .get_hex() method was replaced by the .hex property. To
support both major versions of the interpreter let's try to use .hex if
it exists and fall back to get_hex() only when necessary.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>