Fix bug #65028

Fix bug #65028: Phar::buildFromDirectory creates corrupt archives for so...me specific contents.

Somewhat hackish solution - see https://bugs.php.net/bug.php?id=65028 for the description of the bug and suspected cause.