Initial version from telldus example

Copied from:
http://developer.telldus.com/browser/examples/python/live/tdtool/tdtool.py