fix the bug of get_all_imgs; typo 'dirctory' fixed