Updated cache matrix.R

Hoping to complete Progamming Assignment 2