rmdir works for the last entry