bash: fix encoding on OSX