Added a more secure way when cleaning directories