Merge pull request #479 from koenpunt/fix-args-replacement

string replacement turns out not POSIX compliant