Add readdir/readdirSync support

Refactored @hughsk's https://github.com/substack/brfs/pull/21 to make it work with the static-module stuff