Use atexit to clean capture image directory.