Improvements to example autoloader.

$namespace only used inside of conditional block, no need to explicitly declare it outside.

Increasing the substr by 1, means the str_replace handles the final DIRECTORY_SEPARATOR, so no need to perform an extra string operation to append it.