Output code added

If logFile is defined, an output of the results is saved to a file.
Now, phot returns two arrays, one with the results of the photometry
and another one with the sky background parameters.