Out-File seems to force the BOM when using UTF-8:
Out-File
$MyFile = Get-Content $MyPath $MyFile | Out-File -Encoding \"UTF8\" $MyPath
Starting from version 6 powershell supports the UTF8NoBOM encoding both for set-content and out-file and even uses this as default encoding.
UTF8NoBOM
So in the above example it should simply be like this:
$MyFile | Out-File -Encoding UTF8NoBOM $MyPath