libite: Simplify and fix another memleak in copyfile()
libite: Simplify and fix another memleak in copyfile()

- Simplify: reduce indentation depth
- Always check for error condition first, cleaner code
- Make sure buffer is always freed, use same exit everyhere
- Use readable, but still short, local variable names

Signed-off-by: Joachim Nilsson <583c295fd7602c168ad814279bbc3894ba65f5d6@gmail.com>

troglobit/finit,westermo/finit,troglobit/finit,westermo/finit