reset_dir() function added to image_dir class