Properly delete mongo temp directory on shutdown

IGV-2020