Replace realpath with helpers.real_path