[server][data] Avoid incomplete .sql files from being created.

If hatohol-server-type-util aborts, an incomplete SQL file is created.
This patch prevents it by using a temporary working file.