added function to recursively deleting directory