Cache theme file_exists values and allow custom javascript in themes