Filters bad package names according to spec.