Added pathref codegen (into a string. Boring, I know. With this the pathref tests were modified