Fix realpath() on Ruby 1.8.