Update cachematrix.R with working code

updated makeCacheMatrix and cacheSolve to solve the inverse of a matrix and cache it