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.