server: serve index files when only a directory is requested
server: fix a comment to be more clear
example: add a base template
main: perform some more error checking on the path passed in