Add readDir primop

supersedes #235
readdir() does not always provide a file type on all file systems (e.g. xfs)