requirePackageValid

Check if a string is a legal Java package name.