global: six iteritems usage

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
global: exception syntax fix for Python 3

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
global: print function usage
global: os mask fixes

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>
global: import fixes
global: urlparse import fix
global: six string_types usage

Signed-off-by: Jiri Kuncar <jiri.kuncar@cern.ch>