keepdir is currently defined as a shell function in common.lib. However, PMS section 11.3.3.8 "Installation commands" says: These commands must all be external programs and not bash functions or aliases—that is, they must be callable from xargs. Furthermore, the implementation in pkgcore supports -r/-R options that are neither mentioned by PMS nor used by any ebuild in the Portage tree. (And it's broken: keepdir -r will pass the option to dodir which will create a directory named "-r". ;-)
Fixed in git, recursive support is fixed and staying around as well.