working implementation of makeCacheMatrix and cacheSolve with generalized matrix inversion via ginv