Remove now unused function directory_get
Summary: As of D337, directory_get has no users left; Time to remove it.
Test Plan: make test in the toplevel environment still works
Reviewers: Reviewers!
Differential Revision: https://forge.softwareheritage.org/D339