Update cachematrix.R

Laura Poole's changes to cachematrix.R