R programming Assignment 2: Caching the Inverse of a Matrix