Update cachematrix.R

Updated the functions body.