Makes $PIPE and $FILE macros accept utf-8 input

Fixes issue #2588.