Properly remove temporary files