builder: use Filename.check_suffix

... instead of manually extracting and checking the suffix by ourselves