Solution to cachematrix assignment

Including a test function in a separate file