Replace realpath with cd&pwd shell magic

Merged Ondřej Surý requested to merge 745-fix-missing-realpath-on-centos6 into master

Merge request reports