Better detection absolute path

Fix problem while loading template from phar file.