Updated Cachematrix.R File

solution to programming assignment #2 for Rprogramming course.