My problem was partly addressed in this question. Since I cannot comment yet, I will continue Ulrike Fischer's answer with a new question.
The expample worked on my system as well with pdflatex, but it fails when I use xelatex. Furthermore, even pdflatex only works with absolute directory, not with the other commands from the currfile package.
I extended the example:
\documentclass{article}
\usepackage[abspath]{currfile}
\begin{document}
abs dir: \currfileabsdir
dir: \currfiledir
base: \currfilebase
ext: \currfileext
name: \currfilename
path: \currfilepath
jobname: \jobname
\end{document}
The result with xelatex looks like this:
When I use pdflatex, I get almost the same result, only the absolute directory works fine.
Any suggestions?
My setup: TexLive 2015; Mac OS 10.11

-recorderoption in order forcurrfileto find the required data. – egreg May 24 '16 at 23:15xelatex --recorder test.texand the absolute path is printed. The other paths (dir, path) are not yet printed. -- But I can live with it. Now I am searching for a way to enter the --recorder option into a GUI like TeXShop -- still searching, will come back. – Shinoto May 25 '16 at 04:49