Added unit tests for the directory listing permission filtering