Update cachematrix.R

Created for Coursera - R Programming; Assignment 2.