I have solved this issue. here is how:
file = File.open(path, 'rb') #path => path to zip file
contents = file.read
file.close
user_data = Base64.encode64 contents
now, this user_data
can be safely passed into options[:user_data]
hash without null byte errors. this issue is being tracked here: