param(
  [Parameter(Mandatory = $true)][string]$SourcePath,
  [Parameter(Mandatory = $true)][string]$DestinationPath
)
$ErrorActionPreference = 'Stop'
$encoded = (Get-Content -Raw -LiteralPath $SourcePath) -replace '\s', ''
$bytes = [Convert]::FromBase64String($encoded)
$outputDirectory = Split-Path -Parent $DestinationPath
New-Item -ItemType Directory -Path $outputDirectory -Force | Out-Null
[IO.File]::WriteAllBytes($DestinationPath, $bytes)
