[tkt-10] Saves thumbnails in subfolders

Added Image/Finder class for image file name/folder manipulations.
It provides methods for getting unique path for a thumbnail image using
first three characters from md5 hash as a folder name and the rest as
a file name.

All Commands are now using it to get all kinds of thumbnails files or
folders.

Also refactored GD Image class and added factory method.