Do not call rmtree on a link

Ticket:	#6234