This patch moves code to create absolute path of file/directory to separate helper since the same code is used in few places. Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>