Convert a printfln to a log statement
Fix some header parsing logic
Make ETags parse correctly

The state was not changing correctly when encountering an opening quote
Make codegen take the output directory as an argument

Servo needs this to support out of tree builds