A procedure to obtain reliable pair distribution functions of non-crystalline materials from diffraction data