OptimUSB is a little (96Kb) application for Mac OS X and Windows that keep your USB and memory cards optimized by cleaning these files each time you eject your USB drives.
How to use OptimUSB? The application requires no installation. You must run OptimUSB before ejecting your USB drive. All temporary files get deleted and automatically eject your drive.
It runs on Mac OS X and Windows and can be downloaded free at source.