allow rmdir to remove bucket or object

this is done for consistency with mkdir which allows to create object or bucket