Don't use UTF-8 for .cpuprofile files

@bug W-2164675@
Do not hide test failure with fail to overwrite goldfile exception.
Merging origin/rsalvador/master-pending/cpuprofile into master