Remove temporary directory in try-finally block