Adds test for cache
Ignoring cpickle files
Adds directory argument to cache function