Programming Exercise 2 - for assessment

Uploading updated cachematrix.R script with all required functionality
and documentation (comments) as required by Programming Exercise 2 from
Coursera's Johns Hopkins University R-Programming module.