Enclose code for disposing source and deleting directory inside finally block, backport of #231