optimized the filesystem loader

* added a cache for templates that do not exist
* sped up Filesystem::exists() by avoiding the creation of exceptions

closes #1096