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 :/
Applied to 5.2 as well
Merge pull request #266 from kander/patch-3

Fix #247 The 2nd argument to dir() is not required