Update translate parameters

Pass in file contents as Buffer instead of string.