Optimize images only if modified

Check for file mtime and do optimization only if required. mtimes are stored in yml inside the images folder.