Update cachematrix.R

attempt at programming assignment 2.