realpath(pathname, basedir = nil) -> String[permalink][rdoc]与えられた pathname に対応する絶対パスを返します。
pathname の全てのコンポーネントは存在しなければなりません。
例:
ENV["HOME"]                     # => "/home/matz"
File.symlink("testfile", "testlink")
File.realpath("testfile")       # => "/home/matz/testfile"
File.realpath("testlink")       # => "/home/matz/testfile"
File.realpath("..", "/tmp")     # => "/"