Fix SM paths in a generic way

Most of this change is a manual replace of paths such as "/opt/xensource/sm/foobar" with os.path.join(constants.SM_DEST,"foobar") and similar.