Update cachematrix.R

My answer to Assignment 2 ("R Programming" Course at Coursera)