Fix gen_dir_listings on Windows.