Function to store and retrieve cached data

This commit consists of two function to calculate, cache and retrieve
the inverse of a matrix.   A test script is also included to check the
functionality.