Format support

Tweaked it so it supports pretty much any image extension. Also made it to save into distinct subfolders (enumerated by integers)