Add fallbacks for CDNJS files.
Fix template loading from directory.