Refactor DirectoryLinksProvider to getLinks from file cached in profile directory.
Change test accordingly
Test corrupted json cache file.
Rename function for consistency.