Add support for BSD's stat command (so require.directory works on OS X)

This commit causes files.owner and files.group (and, notably,
not files.mode) operations to try the BSD flavor of stat if stat fails
with 'stat: illegal option'.  This allows the use of require.directory
on OS X.