Fixed API generation when overwriting existing output.

Yay stability.