Updated mapdb and added code that deletes old cache files if needed