util: Add CopyFile helper

Copy file under both Posix systems and Windows.

Signed-off-by: Asias He <asias@cloudius-systems.com>