Fix #247 - 2nd param for dir() is optional

Defaulting the stream context parameter to null, to indicate it is optional.

Johannes, is this the right way to go about this? I'm considering the comment you made on https://bugs.php.net/bug.php?id=50798 explaining that PHP handles default parameter values differently for internal functions, and am unsure how otherwise to indicate the optionality for internal functions :/