sm: set device path to include pid

Also, change the default to /tmp/cci/sm
sm: implement finalize