rm: fix bug in recursive subdirectory removal