Added code to cachematrix.R to complete Assignment 2