This GM would rule that the teleportation effect fails
Magic on Spell Failure says, "If you ever try to cast a spell in conditions where the characteristics of the spell cannot be made to conform, the casting fails and the spell is wasted."
The spell teleport et al. has the entry Target: You and touched objects or other touched willing creatures. Merely touching the container holding a creature is insufficient to affect the creature.
Further, this GM would rule that teleportation can't differentiate between a container and its contents. It's all or nothing; take the container and everything within it or else the effect fails. That is, a teleporter in possession of a bottle of wine can't leave behind the wine and take only the bottle or, somehow, vice versa, and a teleporter can't take only the cage he's touching yet leave behind the wolverines it contains or, bravely, vice versa. It's either take the bottle of wine or leave it, and either take the cage of wolverines or leave it.
Also, in this GM's campaigns, a teleporter can't leave behind the tobacco he's chewing, his partially-digested lunch, nor his belly fat, although he can teleport out of his clothes. (In addition, this GM wouldn't allow a teleporter to take with him another creature's attended objects even if the teleporter were, at the time, touching that other creature's objects; those objects are busy counting toward that creature's maximum load. If the teleporter wants those objects, he's gotta either take those objects from that creature first or teleport the creature.)
Thus a demon like a babau that can use as a spell-like ability an effect that's like the spell greater teleport except only on itself and 50 lbs. of objects sees that greater teleport effect fail outright if it attempts to take another creature with it, even if that other creature managed to secrete itself in the demon's backpack, sack, or belt pouch without the demon seeing it and without the demon noticing the extra weight. (This GM suspects a babau has an extremely keen sense of what exactly 50 lbs. feels like!)
Similarly, a wizard who puts her familiar in her backpack and casts a teleport spell without including the familiar among her creatures touched has created conditions where the characteristics of the spell cannot be made to conform: she has counting against her maximum load an untouched creature, and that's a conundrum that the teleportation effect just refuses to resolve. This GM would have the spell simply fail rather than, for example, ruling that the spell is cast normally except that it leaves behind the familiar yet takes with it the backpack or that it leaves behind both backpack and familiar.
Expand your teleportation capacity with a bag of holding
The typical solution to the low creature capacity of teleportation effects is to put creatures that'll fit into an extradimensional space like a bag of holding then use the teleportation effect and not to forget to let them out afterward! (That last part's really important.) With the extra creatures not on the same plane, the teleportation effect functions normally. (Also see this similar D&D 3.5 question; Pathfinder has, so far as I'm aware, left these rules unchanged from its forebear.)
Note: This GM totally agrees that The effect fails isn't a lot of fun, but it's been this GM's experience that, in the long run,—especially when teleportation effects are involved—that's what's often best for the campaign.