realpath(): don't pass NULL as resolved_name

* passing NULL as resolved_name is not allowed on some systems
  (OS X 10.5, Solaris 10).