Add fread(length) method

This fixes [bug 65545](https://bugs.php.net/bug.php?id=65545) by complimenting `fwrite()` with `fread()`.