Allow file-like objects to be uploaded

Uses the same semantics as rest-client for detecting if something is a 'File', which is anything which has a path and can be read.