Adding an example file and fixing bugs for Kabsch algorithm demo