Adding code for the cachematrix.R file for the Coursera R Programming course