On the Alexander dual of the path ideals of rooted and unrooted trees