Checks if the header-comment of the given file needs fixing.

def check_header_comment(filename):
    """Checks if the header-comment of the given file needs fixing."""
    # Check input file.
    name = os.path.basename( filename )
    # Read content of input file.
    sourcefile = open( filename, "rU" )
    content = sourcefile.read()
    sourcefile.close()
    # Search content for '$Id$'.
    match = re.search(r'\$Id\$', content)
    if match == None:
        # Make sure that the correct value for '$Id$' was already set.
        match = re.search(r'\$Id: ' + name + r'\s+[^$]+\$', content)
        if match != None:
            # The given file needs no fixing.
            return False
    # The given file needs fixing.
    return True