makes sure temporary layout directory is properly removed