Fix for 'expansion of $REDIR' bug on MacOSX.