...and use the compiled regex here:

    ignore_regex.search(relative)