Fixed bug for number with only 1 digit
Cleaning up the code
Refactored extract instruction into a method
Working code for extracting digits from all image files inside a directory