programs: fix build-cscope.sh

Fixed build-cscope.sh to build a cscope database after changing
directory into a symlink. Example:
>ls
dir -> foo
> cd dir