Folding of Thin Walled Tubes as a Free Gradient Discontinuity Problem