os x compat currently with a bit of bloat
oops in chdir wrapper
fchdir support