Implemented directory removal. Refactoring: moved common methods into fsnode.