use the right fn to get cgpath to enter at attach, and add some better fn comments.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>