Fix problem with deleting result and workspace directory