Check for valid package name. Closes #610