Delete functionality for removing directories