Update cachematrix.R

Done by Qi Chen. 2014 May 9th