Update cachematrix.R

Still buggy. Works only partially.