Added unicode support for APIError and added upload support.