Measurement of infrared absorptivities and line shapes and the distortion of anvils in diamond-anvil cells