Correctly format the directory listing and input to whistler_search.