newpage: fix multi-file updates via changing several getchdir() to getcwd()