class Dir

def self.pwd_no_resolve

out to the pwd tool.
Dir.pwd resolves symlinks. This version tries not to, by shelling
def self.pwd_no_resolve
  begin
    result = `pwd`.strip
  rescue Errno::ENOENT
    result = `/bin/pwd`.strip
  end
  if result.empty?
    return Dir.pwd
  else
    return result
  end
end