CORE-4868: Modified the /secured/filesystem/directory endpoint to use a query similar to the one used for the /paged-directory endpoint when listing a directory.
CORE-4868: Fixed the filter flag so it doesn't get set to filenames and also so we check basenames.