Computing Higher Order Derivatives of Matrix and Tensor Expressions