[py] Make scripts Python 3 compatible

One of the criterias when including cm_api to other Python projects
(e.g OpenStack) is Python 3 compatibility. To minimize the entropy
of adding Python 3 support, I applied the six module where conficts
exist between Python 2 and Python 3. Added a test_py3 to Makefile
for Python 3 compatibility testing.