Handling symlink as last path part in File.realpath