Fixed a bug in rrmdir.
Made pathperms work under OS X.