Added Check so rm doesn't fail on empty dirs