TensorInv

Added tensorinv function.
return a list and add test for it.