initial implementation of put file

it seems to work ok for small plain text files but has trouble with
large binary files.