fixed bug in tensorModeRank.m