Prevent multiple response.WriteHeader calls.

HEAD requests were causing the template executer to warn about
ErrBodyNotAllowed. The error handler was then trying to return a 500,
but headers had already be written.

For now we'll just log errors. A better fix may be to buffer a response,
then check for errors before writing it.

Closes #18