Using CImg and boost/filesystem to pack images in a directory