Fix `run_xgettext.sh` code and make it work on osx
Fix `run_xgettext.sh` code and make it work on osx

- run script thru `shellcheck` and fix code
- replace `readlink -f` with a function which works on osx too
- set flags to stop on errors
friendica/friendica,annando/friendica,friendica/friendica,annando/friendica,tobiasd/friendica,annando/friendica,friendica/friendica,friendica/friendica,tobiasd/friendica,tobiasd/friendica,tobiasd/friendica,annando/friendica,annando/friendica,tobiasd/friendica,friendica/friendica