changed around the code to not generate points that are outisde of the map or that are inside walls. Also made changed to the header data partof the file to allow the user to specifiy to source directory for the generated images and also specify the image type.