Function print_dir() were split in get_dir_str() and get_dir_word_count().