Validate distribution package names

Extra safety check in case PackageKit or distribution implementations
pass the names to other commands without checking them first.