Updated the code for makeCacheMatrix and cacheSolve functions

Updated the functions for Programming assignment 2