Check for invalid characters when building distributions.