simplified memoize a bit and made it work with files (for persistance in tmux)
added memoization persistance on the file system with pickle