Removes trailing slash from $_SERVER['DOCUMENT_ROOT'].

Fixes #653.