fix building with older libzip
increase buffer size for faster file uploads
Fix possible buffer overflow (thanks to Mikkel Kamstrup for pointing that out!)