Fix rmdir bug to prevent users from deleting important directories by accident

Fix rmdir bug to prevent users from deleting important directories by accident.  A more complete fix is forthcoming.
Fixes issue #4