Update cachematrix.R

Completed functions for class project Programming Assignment 2 in R programming