Relax some of the checks for writable folder and enabled modules
Tweak memcache initialization
Check private modules folder actually exists
Tweak logging initialization
Fix caching
Add support for socket connections to databases