Added save functionality, fixed fileManager.php issues, etc.

Hey Dr. Mason,

I've made the following changes to the online IAT:

-Added .htaccess to base directory to prevent caching of template text files
-Prompt user if unsaved changes on exit (Note: cannot display jQuery
dialog on unbeforeload event. Stuck with browser-specific modal confirm
display.
-Prompt user if unsaved changes when switching to new template
-Fixed repainting of template form when clicking currently displayed
template item
-Mark template as unsaved (i.e. apply .template-unsaved class) onchange
of template form. Show functional 'Save' icon in template item viewer
(.template-item)
-Display active template when page loads if it exists, else show new
template creator
-Hooked category label input to tab display (i.e. as user changes cat
name, tab name changes as well)
-Hooked template name (#template-name) input to template item viewer
(i.e. #template-selected)
-Refactored code into more smaller functions to enhance readability
-Commented many non-obvious actions to assist future open-source
participants
-Fixed several issues with asynchronous requests (i.e. $.getJSON)
-Revised saveTemplate (formerly validateTemplate) to accept success,
error callbacks
-Fixed several issues with file manager operations (fileManager.php):
a. Saving active template with new name updates active.txt
b. Deleting active template updates active.txt
-Created FileMgr JavaScript object to manage interactions with outside
files (i.e. cache static resources, account for future changes in
filenames, etc.)

Obvious remaining issues to fix:
-Saving new template prevents creation of further new templates until
reload(action replaces #create-new w/.template-item)
-Unwieldy HTML hard-coded into JavaScript. Possibly implement template
system (e.g. jQuery-templ: https://github.com/jquery/jquery-tmpl, etc.)
to streamline future development?

Thanks!
Steven Allon