Final version of cachematrix.R

Programming assignment (hopefully) completed.