UTIL: fix prototype for text_count_until_dir_delim.
FILEIO: make build_wild_list take a directory.

This eliminates the need to change_dir everywhere.
Also removed build_dir_list as the behaviour is equivalent.
FILEIO: remove change_device from fs_unix.c.