fix wrong handling of relative filenames