Fix cloud sdf example for py3k and make it more portable.