Bug 44157 -  The return value of realpath should be tested

Change-Id: Id178ee2fa5e294e858ee2af188e02c67f3205da9