new tmpdir method that allows to specify parent folder
update folder support improved