user lib wrappers for chdir & readdir