upload_file.py: better error handling of port
upload_file: refactor to use binary data when possible

no delimiters, no escaping, accurate translation of doubles and floats