Added ofDirectory canRead/Write/Execute functions. Fixed #1669