fix: use dirname instead of realpath as the latter doesn't work in phar