set mode 0644 for files downloaded in

(also access/change time)

Signed-off-by: Max Brunsfeld <mbrunsfeld@pivotallabs.com>
close input stream after content is written

Signed-off-by: Max Brunsfeld <mbrunsfeld@pivotallabs.com>