[utils] Add getRealpath function