Bug 46707 - Sort '~' above '\0' when comparing package versions

Summary: Sort '~' above '\0' when comparing package versions