Added a custom realdirpath method.