apikey: change rename to copy/delete for temp file

* godaddy puts temporary files on a different disk, so rename crashed