modified template matching

modification:
this saves the transformation matrix in a .txt file and saves the transformed cloud in a file