Use readlink instead of a Python one-liner

Use readlink instead of python -c "import os, sys; print(os.path.realpath(\"$1\"))".
This removes an unnecessary dependency upon Python as well as an
injection-attack vector: followSymlink can only be used for data that is
trusted absolutely, because a value of '"; ... "' for $1 (the argument
to followSymlink), where '...' is arbitrary Python code, will cause the
input to be executed.
Add missing $

Was missing a $ before the variable name RTAGS_GCC_WRAPPER in the
conditional at the start of the program.
Clean up lint

Fix issues identified by shellcheck
<http://www.shellcheck.net/about.html>:
* Unquoted expansions (not all caused shellcheck to emit a warning)
  <https://github.com/koalaman/shellcheck/wiki/SC2086> and
  <https://github.com/koalaman/shellcheck/wiki/SC2046>
* Use $(...) instead of deprecated `...`
  <https://github.com/koalaman/shellcheck/wiki/SC2006>

Merge one-use variable dir from the else clause into the expansion in
which it's used, and add a comment explaining the sed command.