Add ability to query current src and dst dirs

The change adds to new helper functions, srcdir() and dstdir(), which can be
used from the embedded python code to query the current src and dst directory
of the generated file.