Implemented a ServletContextListener to clean up the temp files.