The Probability Integral Transformation for Non Necessarily Absolutely Continuous Distribution Functions, and its Application to Goodness-of-Fit Tests