In the headers.txt file there is a aws:x-amz-cek-alg value, this cannot be used as a header, as it has : inside it which is illegal according to: http://tools.ietf.org/html/rfc7230#section-3.2
I believe the correct line should read:
x-amz-matdesc: {"aws:x-amz-cek-alg":"AES/GCM/NoPadding"}