Using POSIX compliant syntax

So that it works on dash, bash, or any other posix compliant shell
Merge remote-tracking branch 'devel/bug#295_fix_scripts' into devel-master