Fix issue with creating request path.

Only use $_SERVER['REDIRECT_PATH_INFO'] or $_SERVER['PATH_INFO'] if they are not blank.