Fix FastCGI mode

Note that this expects REQUEST_URI to be the path in this format:
/<args>/<upstream>

If the FastCGI responder is mounted on a URL prefix, configure the
frontend server to strip it off. For example, for nginx, something
like this should be safe:

  location /thumb/ {
    include /etc/nginx/fastcgi_params;
    fastcgi_split_path_info ^(/thumb)(/.*)$;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param REQUEST_URI $fastcgi_path_info;
    fastcgi_param SCRIPT_NAME "";
    fastcgi_index '';
    fastcgi_pass 127.0.0.1:9000; # FastCGI upstream
  }