Improvements to example autoloader.

`$namespace` only used inside of conditional block, no need to explicitly declare it outside.

Increasing the `substr()` length by 1, means the `str_replace()` handles the final `DIRECTORY_SEPARATOR`, so no need for the extra string operation appending it.