Remove slash in the end of document root if no custom document root provided