Fixed a temp dir download issue. Closed unclosed file handles when
executing Fido script.