stop leaking fds in CopyFile

Signed-off-by: dmitriy kalinin <dmitriy@pivotallabs.com>
formatting

Signed-off-by: dmitriy kalinin <dmitriy@pivotallabs.com>