added check if torrent is directory