ENH: Possibility to filter out read only directory

#3366