Fixing broken PathExpander test

Made a PathExpander less fragile as it was breaking on some php
versions.
Making a PhpWorker test assertion more lax

The assertion was way too tight and caused the test to fail on travis.