Added the option to display log messages to the screen (html output)

DEFINE('CFG_LOG_SCREEN', true);
updated some comments
Updated the log functions to write the log ouput to the screen.
Fixed an issue where the Library was not returning any content of the
item was in the cahce but expired.
Setup some test cases to test the FileCache and Libry object fully.