Replace abspath with realpath.