Use mktemp for temporary files.

I had another file already at /tmp/changelog and it broke things =/