tests: Improve coverage on `directory_ls` endpoints
Prior to this commit, when listing a directory, we did not check up to the contents. This fixes it.
This also fixes one inconsistent test data and the tests impacted by this change.
Detected in !989 (closed)
Test Plan
tox
Migrated from D3694 (view on Phabricator)