I'm not sure why you are seeing the behavior you are seeing.  I have
symlinks on my system, and when I use `pwd` from those directories, I get
the same result as when I type it on the command-line.

Have you tried Dir.getwd instead?  It will probably be more portable
anyway (iirc, Windows has no pwd command).

Paul