The apparmor_parser has 3 different directory walking routines. Abstract them out and use a single common routine. Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-By: Steve Beattie <sbeattie@ubuntu.com>