html.c: Fix a horrible file-not-found breakage

This would cause semi-random file descriptors to be closed, causing
butt-ugly breakage later. Mental note for self: When calling a variable for
"fd", only use it for fd's.