added graceful handling of content.html when no network

It just reports that the file is empty. We could do some kind of 404,
but I think this is clear enough.
refactored the way we list files for a directory

Now everything is centralized in a list. It might also be *kinda* neat
to include function pointers in here so we can just list specific
functions for reading something like "content.html" as a function, but
that's for the future.
moved all the getattr stuff into their own functions

I may be overengineering this, but it is a neat way to solve the problem