fix fatal error on metadata missing and minor others fixes
Merge pull request #184 from llaville/phar

Fix fatal error on Phar task (and more)