sl_realpath now returns a malloc'd buffer
return string object directly if it's already a string