Update cachematrix.R

Working version from desktop