Index page support + Better error catching

* Updated the script to support the index page with borders, clean links, and limit (thumbnail count) fixes for links and the search box.
* Added in quick error checking for a few areas.
* Cleaned up/simplified the CSS, tab spacing, and a few other things.