This makes the build reproducible irregardless of the build path. Fixes: #1565
Encode relative path to working tree in code paths when possible.
This is consistent with the behaviour in generate_filename_table() in Cython/Compiler/ModuleNode.py, which also removes the workdir from the prefix of module paths.
Isn't this a job for os.path.relpath()?