Removed some occurences of getRealpath()