Update httpd-cgi.c

Implemented state changes for which direction the rover is facing on a turn-by-turn basis.