'Save breakpoints when file is saved'

def store_file_breaks(self):

    breaks = self.breakpoints
    filename = self.io.filename
    try:
        lines = open(self.breakpointPath, 'r').readlines()
    except IOError:
        lines = []
    new_file = open(self.breakpointPath, 'w')
    for line in lines:
        if (not line.startswith((filename + '='))):
            new_file.write(line)
    self.update_breakpoints()
    breaks = self.breakpoints
    if breaks:
        new_file.write((((filename + '=') + str(breaks)) + '\n'))
    new_file.close()
