Fix Typo's
Move if statement to multiple lines for better readibility
Adds ability to specify caching dir when using MDS File Caching