Perl script - takes a directory of images and generates a HTML photo gallery