'If the dependency `filename` has not already been added,
append it to self.list and print it to self.file if self.file
is not None.'

def add(self, filename):

    if (not (filename in self.list)):
        self.list.append(filename)
        if (self.file is not None):
            print >>self.file, filename
