Update cachematrix.R

Working version - copied from local, working copy.