permissions api in directory package is useless (and possibly harmful)