Fix uninstallation of mono templates directory
Fix uninstallation of mono templates directory

The previous code didn't take into account that templates directories
can have subdirectories like the mono templates have.
Also fix an unclosed dir handle.

Paulloz/godot,pkowal1982/godot,sanikoyes/godot,pkowal1982/godot,BastiaanOlij/godot,akien-mga/godot,MarianoGnu/godot,Valentactive/godot,ZuBsPaCe/godot,honix/godot,godotengine/godot,Shockblast/godot,firefly2442/godot,DmitriySalnikov/godot,Shockblast/godot,guilhermefelipecgs/godot,MarianoGnu/godot,Zylann/godot,DmitriySalnikov/godot,BastiaanOlij/godot,josempans/godot,pkowal1982/godot,Faless/godot,vnen/godot,vnen/godot,DmitriySalnikov/godot,pkowal1982/godot,ZuBsPaCe/godot,MarianoGnu/godot,akien-mga/godot,Valentactive/godot,godotengine/godot,Shockblast/godot,vnen/godot,firefly2442/godot,Zylann/godot,pkowal1982/godot,ex/godot,Valentactive/godot,Faless/godot,guilhermefelipecgs/godot,akien-mga/godot,guilhermefelipecgs/godot,MarianoGnu/godot,guilhermefelipecgs/godot,Valentactive/godot,Zylann/godot,akien-mga/godot,Shockblast/godot,godotengine/godot,pkowal1982/godot,ZuBsPaCe/godot,BastiaanOlij/godot,Valentactive/godot,honix/godot,vkbsb/godot,vkbsb/godot,Paulloz/godot,Shockblast/godot,pkowal1982/godot,vnen/godot,akien-mga/godot,Paulloz/godot,ex/godot,Zylann/godot,ex/godot,Paulloz/godot,sanikoyes/godot,vkbsb/godot,vkbsb/godot,Valentactive/godot,guilhermefelipecgs/godot,honix/godot,guilhermefelipecgs/godot,Paulloz/godot,ex/godot,Zylann/godot,DmitriySalnikov/godot,ZuBsPaCe/godot,akien-mga/godot,BastiaanOlij/godot,Valentactive/godot,firefly2442/godot,ZuBsPaCe/godot,vnen/godot,firefly2442/godot,vkbsb/godot,vnen/godot,ZuBsPaCe/godot,Zylann/godot,vnen/godot,josempans/godot,Faless/godot,MarianoGnu/godot,vkbsb/godot,godotengine/godot,firefly2442/godot,Valentactive/godot,godotengine/godot,DmitriySalnikov/godot,ex/godot,akien-mga/godot,Shockblast/godot,josempans/godot,honix/godot,guilhermefelipecgs/godot,Faless/godot,firefly2442/godot,BastiaanOlij/godot,sanikoyes/godot,sanikoyes/godot,ex/godot,MarianoGnu/godot,sanikoyes/godot,Paulloz/godot,honix/godot,vnen/godot,MarianoGnu/godot,Zylann/godot,Shockblast/godot,pkowal1982/godot,Faless/godot,ex/godot,godotengine/godot,josempans/godot,ZuBsPaCe/godot,Faless/godot,firefly2442/godot,BastiaanOlij/godot,godotengine/godot,vkbsb/godot,BastiaanOlij/godot,Faless/godot,josempans/godot,sanikoyes/godot,guilhermefelipecgs/godot,vkbsb/godot,ex/godot,Paulloz/godot,Zylann/godot,josempans/godot,honix/godot,akien-mga/godot,josempans/godot,sanikoyes/godot,firefly2442/godot,josempans/godot,BastiaanOlij/godot,ZuBsPaCe/godot,DmitriySalnikov/godot,Faless/godot,godotengine/godot,Shockblast/godot,sanikoyes/godot,DmitriySalnikov/godot,MarianoGnu/godot