On the regularity of matrix refinable functions