Update cachematrix.R

Programming assignment 2. My first use of github.