Added length checking for maps. Photon maps are calculated if a valid map.dat file is not found in the current directory.