fix to allow use of realpath