Fixed str_replace of document root/DIR so it generates the correct path on windows

On windows the paths is escaped in $_SERVER['DOCUMENT_ROOT'] and the __DIR__ is not. The str_replace doesnt work then.