BS-9304 : [6.3] Temporary folder never get cleared

- Remove the double shutdownHook on a same folder
- Clean a test
- Remove unused method