adding files ported from wget.

Not finished.