Fix install issue with second run removing incorrect temporary directory